3 Prev Chapter 36. The Amanda Manual Pages. Next
5 -------------------------------------------------------------------------------
9 amanda
\14 Advanced Maryland Automatic Network Disk Archiver
13 amadmin config command [options]
14 amcheck [options] config
22 amgetconf [config] parameter
23 amlabel config label [ slot slot ]
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]
35 amtoc [options] logfile
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
44 Here are all the Amanda commands. Each one has its own manual page. See them
45 for all the gory details.
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.
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.
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.
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
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.
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.
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).
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
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.
101 Take care of tape changer control operations like loading particular
102 tapes, ejecting tapes and scanning the tape storage slots.
105 Check Amanda backup tapes for errors.
108 Delete a tape from the Amanda databases.
111 Report the status of a running or completed amdump.
114 Display a chart of hosts and file systems backed up every run.
117 Generate utilization plots of Amanda runs for performance tuning.
120 Generate an Amanda summary E-mail report.
123 Generate table of content files for Amanda tapes.
126 Verify every tape Amanda knows about is consistent in the database.
129 Look up parameters in the Amanda configuration file.
132 Generate a tapetype definition.
135 Wrapper program from aespipe (data encryption utility)
138 Reference encryption program for Amanda symmetric data encryption
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)
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
179 The disklist file determines which disks will be backed up by Amanda. The file
180 usually contains one line per disk:
182 hostname diskname [diskdevice] dumptype [spindle [interface] ]
184 All pairs [ hostname diskname ] must be unique.
185 Lines starting with # are ignored, as are blank lines. The fields have the
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
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.
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.
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
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.
223 Default: local. The name of a network interface definition in the
224 amanda.conf file, used to balance network load.
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:
235 hostname diskname [ diskdevice ] {
238 } [ spindle [ interface ] ]
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:
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
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:
272 This is the default driver. The driver-info is the tape device name.
277 is really a short hand for
279 tapedev tape:/dev/rmt/0mn
283 This driver throws away anything written to it and returns EOF for any
284 reads except a special case is made for reading a label, in which case a
285 "fake" value is returned that Amanda checks for and allows through
286 regardless of what you have set in labelstr. The driver-info field is not
287 used and may be left blank:
291 The length value from the associated tapetype is used to limit the amount
292 of data written. When the limit is reached, the driver will simulate end
297 This driver should only be used for debugging and testing, and probably
298 only with the record option set to no.
301 Redundant Array of Inexpensive (?) Tapes. Reads and writes tapes mounted
302 on multiple drives by spreading the data across N-1 drives and using the
303 last drive for a checksum. See docs/RAIT for more information.
304 The driver-info field describes the devices to use. Curly braces indicate
305 multiple replacements in the string. For instance:
307 tapedev rait:/dev/rmt/tps0d{4,5,6}n
309 would use the following devices:
310 /dev/rmt/tps0d4n /dev/rmt/tps0d5n /dev/rmt/tps0d6n
315 This driver emulates a tape device with a set of files in a directory.
316 The driver-info field must be the name of an existing directory. The
317 driver will test for a subdirectory of that named data and return offline
318 until it is present. When present, the driver uses two files in the data
319 subdirectory for each tape file. One contains the actual data. The other
320 contains record length information.
321 The driver uses a file named status in the file device directory to hold
322 driver status information, such as tape position. If not present, the
323 driver will create it as though the device is rewound.
324 The length value from the associated tapetype is used to limit the amount
325 of data written. When the limit is reached, the driver will simulate end
327 One way to use this driver with a real device such as a CD-writer is to
328 create a directory for the file device and one or more other directories
329 for the actual data. Create a symlink named data in the file directory to
330 one of the data directories. Set the tapetype length to whatever the
332 When Amanda fills the file device, remove the symlink and (optionally)
333 create a new symlink to another data area. Use a CD writer software
334 package to burn the image from the first data area.
335 To read the CD, mount it and create the data symlink in the file device
341 Amanda processes on the tape server host run as the dumpuser user listed in
342 amanda.conf. When they connect to a backup client, they do so with an Amanda-
343 specific protocol. They do not, for instance, use rsh or ssh directly.
344 On the client side, the amandad daemon validates the connection using one of
345 several methods, depending on how it was compiled and on options it is passed:
349 Even though Amanda does not use rsh, it can use .rhosts-style
350 authentication and a .rhosts file.
353 This is essentially the same as .rhosts authentication except a different
354 file, with almost the same format, is used. This is the default mechanism
356 The format of the .amandahosts file is:
357 hostname [ username [ service ]*]
358 If username is ommitted, it defaults to the user running amandad, i.e.
359 the user listed in the inetd or xinetd configuration file.
360 The service is a list of the service the client is authorized to execute:
361 amdump, noop, selfcheck, sendsize, sendbackup, amindexd, amidxtaped.
362 amdump is a shortcut for "noop selfcheck sendsize sendbackup"
365 Amanda may use the Kerberos authentication system. Further information is
366 in the docs/KERBEROS file that comes with an Amanda distribution.
367 For Samba access, Amanda needs a file on the Samba server (which may or
368 may not also be the tape server) named /etc/amandapass with share names,
369 (clear text) passwords and (optional) domain names, in that order, one
370 per line, whitespace separated. By default, the user used to connect to
371 the PC is the same for all PC's and is compiled into Amanda. It may be
372 changed on a host by host basis by listing it first in the password field
373 followed by a percent sign and then the password. For instance:
375 //some-pc/home normalpw
376 //another-pc/disk otheruser%otherpw
378 With clear text passwords, this file should obviously be tightly
379 protected. It only needs to be readable by the Amanda-user on the Samba
381 You can find further information in the docs/SAMBA file that comes with
382 an Amanda distribution.
385 HOST & DISK EXPRESSION
387 All host and disk arguments to programs are special expressions. The command
388 applies to all disks that match your arguments. This section describes the
390 The matcher matches by word, each word is a glob expression, words are
391 separated by the separator '.' for host and '/' for disk. You can anchor the
392 expression at left with a '^'. You can anchor the expression at right with a
393 '$'. The matcher is case insensitive for host but is case sensitive for disk. A
394 match succeeds if all words in your expression match contiguous words in the
397 . word separator for a host
398 / word separator for a disk
401 ? match exactly one character except the separator
402 * match zero or more characters except the separator
403 ** match zero or more characters including the separator
407 EXPRESSION WILL MATCH WILL NOT MATCH
414 ho*na hoina ho.aina.org
417 ^hosta hosta foo.hosta.org
420 /opt opt (disk) opt (host)
421 .opt. opt (host) opt (disk)
430 A datestamp expression is a range expression where we only match the prefix.
431 Leading ^ is removed. Trailing $ forces an exact match.
432 _________________________________________________________________________
433 |20001212-14|match_all_dates_beginning_with_20001212,_20001213_or_20001214|
434 |20001212-4_|same_as_previous_____________________________________________|
435 |20001212-24|match_all_dates_between_20001212_and_20001224________________|
436 |2000121____|match_all_dates_that_start_with_2000121_(20001210-20001219)__|
437 |2__________|match_all_dates_that_start_with_2_(20000101-29991231)________|
438 |2000-10____|match_all_dates_between_20000101-20101231____________________|
439 |200010$____|match_only_200010____________________________________________|
444 A dump specification selects one or more dumps. It has the form [host][:disk]
445 [@datestamp], where each component is a pattern as described above. If a
446 component is missing, it is treated as a wildcard. The characters ':', '@', and
447 '\' may be escaped within any component by preceding them with a '\'.
451 client17 all dumps of client17
452 @20080615 All dumps on with datestamps matching 20080615
453 webserver:/var/www All dumps of /var/www on host webserver
454 webserver:/var/www@200806150317 The dump of webserver with datestamp
456 :/var/www All dumps of /var/www on any host
459 CONFIGURATION OVERRIDE
461 Most command allow to overwrite any configuration parameter on the command line
465 eg. -o DUMPTYPE:no-compress:compress="server fast"
466 eg. -o TAPETYPE:HP-DAT:length=2000m
467 eg. -o INTERFACE:local:use="2000 kbps"
471 James da Silva, <jds@amanda.org> : Original text
472 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the Amanda-documentation:
473 XML-conversion, major update
477 amadmin(8), amanda.conf(5), amanda-client.conf(5), amcheck(8), amcheckdb(8),
478 amcleanup(8), amdd(8), amdump(8), amfetchdump(8) amflush(8), amgetconf(8),
479 amlabel(8), ammt(8), amoverview(8), amplot(8), amrecover(8), amreport(8),
480 amrestore(8), amrmtape(8), amstatus(8), amtape(8), amtapetype(8), amtoc(8),
481 amverify(8), amverifyrun(8)
482 -------------------------------------------------------------------------------
485 amaespipe Home amanda.conf