Imported Upstream version 3.3.3
[debian/amanda] / man / xml-source / amanda-devices.7.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 <refentry id='amanda-devices.7'>
11
12 <refmeta>
13 <refentrytitle>amanda-devices</refentrytitle>
14 <manvolnum>7</manvolnum>
15 &rmi.source;
16 &rmi.version;
17 &rmi.manual.7;
18 </refmeta>
19 <refnamediv>
20 <refname>amanda-devices</refname>
21 <refpurpose>Configuring and Using Amanda Devices</refpurpose>
22 </refnamediv>
23 <refentryinfo>
24 &author.ian;
25 &author.dustin;
26 </refentryinfo>
27 <!-- body begins here -->
28
29 <refsect1><title>DESCRIPTION</title>
30
31 <para>The Device API specifies a generic interface between Amanda and storage
32 devices such as tapes or disks.  This manual page describes the device
33 drivers included with Amanda.</para>
34
35 <para>This is a <emphasis>user-level</emphasis> description of the API, and
36 does not address details that are only of concern to developers.  For that
37 purpose, consult the Amanda source code and http://wiki.zmanda.com.</para>
38
39 <para>The term "device driver" describes the software that can communicate with
40 some kind of backend storage, e.g., a tape driver.  A "device" is the storage
41 element itself, usually a piece of hardware. When discussing a device and its
42 driver as a unit, the term  "device" is sometimes also used to refer to the
43 combination of device and driver.</para>
44
45
46 </refsect1>
47
48 <refsect1><title>SPECIFYING DEVICES</title>
49
50 <para>Device names take the form <emphasis>TYPE:NODE</emphasis>, where
51 <emphasis>TYPE</emphasis> selects a device driver, and
52 <emphasis>NODE</emphasis> provides further information to that driver.  The
53 syntax for each device driver is given in the corresponding section
54 below.</para>
55
56 <para>Devices can be described in &amconf; with "device" sections, e.g.,
57 <programlisting>
58 define device top_drive {
59     tapedev "tape:/dev/nst0"
60     device-property "BLOCK_SIZE" "131072"
61 }
62 </programlisting>
63 Such a device defininition creates a device "alias", in this case named
64 <emphasis>top_drive</emphasis>, which can then be named in the global
65 <emphasis>tapedev</emphasis> or <emphasis>tpchanger</emphasis> parameter:
66 <programlisting>
67 tapedev "top_drive"
68 </programlisting>
69 </para>
70
71 <para>The global <emphasis>tapedev</emphasis> parameter can also specify a
72 literal device name.  For example,
73 <programlisting>
74 tapedev "file:/amdisks"
75 </programlisting>
76 is equivalent to
77 <programlisting>
78 tapedev "default"
79 define device default {
80     tapedev "file:/amdisks"
81 }
82 </programlisting>
83 Note that, in both cases, the specified devices are actually accessed through
84 the <emphasis>chg-single</emphasis> changer driver; see <manref
85 name="amanda-changers" vol="7" /> for more information.  </para>
86
87 <para>Device properties specified outside of any device definition apply to
88 all devices.  This syntax is provided mainly for backward compatibility, and
89 for simple Amanda configurations.  Note that there is no way to provide
90 properties specific to a device without defining a device alias.</para>
91
92 <para>See <manref name="amanda-changers" vol="7" /> for details on how devices
93 are configured, and in particular on how device properties are specified.  See
94 <manref name="amanda.conf" vol="5"/> for more information on Amanda
95 configuration in general.</para>
96
97 <note><para>
98 There is no way to reset a device property to its default value.
99 </para></note>
100
101 </refsect1>
102
103 <refsect1><title>PROPERTIES</title>
104
105 <para>Device drivers use <emphasis>properties</emphasis> as a generic means to
106 interact with other parts of Amanda.  Some properties are set by the device
107 driver and used by Amanda to determine how its devices should be used.  Other
108 properties can be set by Amanda or by the user to influence the driver's
109 behavior. Properties are set for a particular device, so that if you have two
110 tape devices, they will not share property values.</para>
111
112 <para>Properties are specified in <emphasis>amanda.conf</emphasis> with the
113 <emphasis>device-property</emphasis> parameter.  The syntax looks like this:
114 <programlisting>
115 device-property "FROBNICATOR_PATH" "/var/frobd/state"
116 device-property "BYTES_PER_FORTNIGHT" "128k"
117 device-property "USE_QUBITS" "no"
118 </programlisting></para>
119
120 <para>Both the property name and the property value are always quoted.
121 Property names, like Amanda configuration parameters, are not
122 case-sensitive, and <literal>-</literal> (dash) and <literal>_</literal>
123 (underscore) may be used interchangeably.  String values are given as
124 simple strings, like FROBNICATOR_PATH in the example above.  Integer values
125 can be specified with any of the suffixes given in the "VALUE SUFFIXES"
126 section of &amconf;, like BYTES_PER_FORTNIGHT, above.  Boolean values can
127 be specified using the same names as in &amconf;, like USE_QUBITS, above.
128 Some properties have special formats, as described below.</para>
129
130 <para>Some properties are set based on other configuration values, such as
131 tapetype parameters.  These special cases are detailed under the appropriate
132 property, below.</para>
133
134 <para>The order in which device properties are set is as follows:
135 <orderedlist>
136 <listitem><para>Tapetype parameters (including length, blocksize, and readblocksize) are translated into device properties and set accordingly.</para></listitem>
137 <listitem><para>Device properties from any device-property
138     configuration parameters are set, in the order they appear in the
139     configuration file.</para>
140 </listitem>
141 </orderedlist></para>
142
143 <para>Properties described as read-only are not accessible to users.  They are
144 listed here for completeness.</para>
145
146 <refsect2><title>COMMON PROPERTIES</title>
147
148 <para>Note that some of these properties are currently unused, and present only
149 for future expansion.  Not all devices implement all of these properties.</para>
150
151 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
152
153 <variablelist>
154  <!-- ==== -->
155  <varlistentry><term>APPENDABLE</term><listitem>
156  (read-only) This boolean property indicates whether this device supports appending data to volumes.
157 </listitem></varlistentry>
158  <!-- ==== -->
159  <varlistentry><term>BLOCK_SIZE</term><listitem>
160  (read-write) This property gives the block size, in bytes, that will be used to write to the device.  The usual suffixes ("kbytes", etc.) are allowed.  The tapetype parameter <emphasis>blocksize</emphasis> sets this property.
161 </listitem></varlistentry>
162  <!-- ==== -->
163  <varlistentry><term>CANONICAL_NAME</term><listitem>
164  (read-only) This property contains the full canonical name for this device.  This name may not be the same as the user-supplied name, but is a valid name by which to access this device.
165 </listitem></varlistentry>
166  <!-- ==== -->
167  <varlistentry><term>COMMENT</term><listitem>
168  (read-write) This string property is entirely for the user's convenience.  It is supported by all devices, but no device interprets its value in any way.
169 </listitem></varlistentry>
170  <!-- ==== -->
171  <varlistentry><term>COMPRESSION</term><listitem>
172  (read-write) This boolean property represents the compression status of the device, and can be used to enable and disable such compression.  This applies mostly to tape devices, although many tape devices do not support setting compression from software.
173 </listitem></varlistentry>
174  <!-- ==== -->
175  <varlistentry><term>COMPRESSION_RATE</term><listitem>
176  (read-only) This property gives the compression rate, as a decimal ratio.  It may be a measured value over some unspecified period or a simple estimate.
177 </listitem></varlistentry>
178  <!-- ==== -->
179  <varlistentry><term>CONCURRENCY</term><listitem>
180  (read-only) This property indicates the level of concurrent access that this device supports.
181 </listitem></varlistentry>
182  <!-- ==== -->
183  <varlistentry><term>FULL_DELETION</term><listitem>
184  (read-only) This property indicates whether the device supports erasing the entire volume.  Aside from S3 and VFS, most devices cannot support this feature.
185 </listitem></varlistentry>
186  <!-- ==== -->
187  <varlistentry><term>LEOM</term><listitem>
188 (read-write) If this property is true, then the device can detect an EOM condition before actually running out of space, allowing Amanda to forgo caching parts while writing.  For some devices, it is necessary to override the conservative default value of this property.
189 </listitem></varlistentry>
190  <!-- ==== -->
191  <varlistentry><term>MAX_BLOCK_SIZE</term><listitem>
192  (read-only) This property gives the maximum block size this device can support.  See BLOCK SIZES, below.
193 </listitem></varlistentry>
194  <!-- ==== -->
195  <varlistentry><term>MEDIUM_ACCESS_TYPE</term><listitem>
196  (read-only) This property gives the type of the media in the device: read only, WORM (Write Once, Read Many), read/write, or write only.  Write-only devices do not support recovery, but the data are not necessarily thrown out.
197 </listitem></varlistentry>
198  <!-- ==== -->
199  <varlistentry><term>MIN_BLOCK_SIZE</term><listitem>
200  (read-write) This property gives the minimum block size this device can support.  See BLOCK SIZES, below.
201 </listitem></varlistentry>
202  <!-- ==== -->
203  <varlistentry><term>MAX_VOLUME_USAGE</term><listitem>
204  (read-write) On devices that support it, this property will limit the total amount of data written to a volume; attempts to write beyond this point will cause the device to simulate "out of space."  Zero means no limit.  The tapetype parameter <emphasis>length</emphasis> sets this property.
205 </listitem></varlistentry>
206  <!-- ==== -->
207  <varlistentry><term>ENFORCE_MAX_VOLUME_USAGE</term><listitem>
208  (read-write) If this property is false, limit set by MAX_VOLUME_USAGE property (and thus the tapetype LENGTH parameter) will not be verified while writing to device, allowing the volume to expand without limit. If this property is true, then MAX_VOLUME_USAGE willbe enforced, limiting the total size of the volume. This property is not available on all devices; see below.
209 </listitem></varlistentry>
210  <!-- ==== -->
211  <varlistentry><term>PARTIAL_DELETION</term><listitem>
212  (read-only) This property indicates whether the device supports deletion of specific files.  Aside from linear tapes and S3, most devices can support this feature.  It is currently unused by Amanda.
213 </listitem></varlistentry>
214  <!-- ==== -->
215  <varlistentry><term>STREAMING</term><listitem>
216 (read-only) This property gives the streaming requirement for this device.  For
217 example, tape drives often require a steady supply of data to avoid
218 shoe-shining, while disk devices have no such requirement.  Streaming is
219 accomplished by buffering <amkeyword>device-output-buffer-size</amkeyword> bytes of
220 data.  The allowed values are "none" (no streaming buffer necessary),
221 "required" (fill the buffer before starting to write), or "desired" (fill the
222 buffer before starting to write, and if the buffer becomes empty, stop writing
223 until it is completely full again).
224 </listitem></varlistentry>
225  <!-- ==== -->
226  <varlistentry><term>VERBOSE</term><listitem>
227  (read-write) If this boolean property is set, then the device will produce verbose debugging output.  This property is not recognized by most devices.
228 </listitem></varlistentry>
229  <!-- ==== -->
230 </variablelist>
231
232 <refsect3><title>BLOCK SIZES</title>
233
234 <para>Amanda writes device data in blocks. On most devices the block
235 boundaries are embedded in the media along with the data itself, so subsequent
236 reads must use the same block sizes.  On tape devices, the block size is
237 dictated by the capabilities of the hardware -- buffer sizes, physical format,
238 and so on.</para>
239
240 <para>Amanda has historically supported a single, fixed block size -- usually
241 32k.  The Device API adds the ability to specify a block size at runtime, using
242 the BLOCK_SIZE property.  Devices provide MIN_BLOCK_SIZE and MAX_BLOCK_SIZE as
243 a guide to the range of acceptable block sizes. Note that this does not imply
244 that all sizes in the range MIN_BLOCK_SIZE - MAX_BLOCK_SIZE are available --
245 the device may require that block sizes are even multiples of some power of
246 two, for example.  Consult the documentation for your hardware and operating
247 system for more information.</para>
248
249 <para>Most devices are flexible enough to read a volume using a different block
250 size than that with which it was written.  This can be useful when handling old
251 volumes written with a smaller blocksize, or volumes of unknown blocksize.
252 Unfortunately, some tape devices do not detect oversized blocks correctly, and
253 may lose data if the configured block size is smaller than the volume's block
254 size.  The tape device driver has a READ_BLOCK_SIZE property which specifies
255 the minimum buffer size that will be allocated for reads from tape.  If the
256 hardware supports it, setting this property allows Amanda to correctly read
257 from tapes written with any blocksize less than or equal to READ_BLOCK_SIZE.</para>
258
259 <note><para>The RAIT device does not support flexible block sizes, as its
260 parity algorithm requires that all child devices have the same, fixed block
261 size.</para></note>
262
263 </refsect3>
264
265 <refsect3><title>LEOM DETECTION</title>
266
267 <para>Some Amanda devices can detect end-of-medium (running out of space on the
268 device) before it occurs.  This early warning is referred to as logical EOM,
269 and where it is supported Amanda can operate more efficiently, since the
270 possibility for data loss is reduced.</para>
271
272 <para>The boolean LEOM property indicates whether or not a particular device
273 supports LEOM detection.  The sections below also describe the degree of
274 support.</para>
275
276 </refsect3>
277
278 </refsect2>
279
280 </refsect1>
281
282 <refsect1><title>DEVICES</title>
283
284 <para>This section lists the device drivers included with Amanda, and basic instructions for using them.  For complete How-To information, consult the Amanda wiki at http://wiki.zmanda.com.</para>
285
286 <refsect2><title>Null Device</title>
287 <programlisting>
288 tapedev "null:"
289 </programlisting>
290
291 <para>The null device driver only supports writing, and discards all data.  It is
292 generally only useful for testing purposes.</para>
293
294 </refsect2>
295
296 <refsect2><title>RAIT Device</title>
297 <programlisting>
298 tapedev "rait:tape:/dev/rmt/tps0d{4,5,6}n"
299 </programlisting>
300
301 <para>The RAIT device driver mirrors or stripes data over multiple "child"
302 devices.  The child devices are specified using a shell-like syntax, where
303 alternatives are enclosed in braces and separated by commas.  Braces and commas
304 can be escaped with a backslash.  Note that the backslash itself must be
305 escaped in most contexts.  For example:
306 <programlisting>
307 tapedev "rait:{file:/var/amanda/vtapes,tape:/dev/nst0}"
308 tapedev "rait:{comma-dev:foo\\,bar,brace-dev:foo\\}bar}" # quoting
309 </programlisting>
310 If the braces contain a numeric range separated with two dots, that range will
311 be filled in sequentially.  If the first number has a leading zero, then the results
312 will be zero-padded to the maximum length.  For example:
313 <programlisting>
314 tapedev "rait:file:/var/amanda/vtapes/drive{01..04}"
315 </programlisting>
316 </para>
317
318 <para>With two child devices, the RAIT device driver mirrors data such that the
319 two devices contain identical data and can be used singly for
320   recovery.  With more than two devices, the RAIT device "stripes"
321   data across all but one device and writes a parity block to the
322   final device, usable for data recovery in the event of a device or
323   volume failure.  The RAIT device scales its blocksize as necessary
324   to match the number of children that will be used to store data.</para>
325
326 <para>When a child device is known to have failed, the RAIT device should be reconfigured to replace that device with the text "ERROR", e.g.,
327 <programlisting>
328 tapedev "rait:{tape:/dev/st0,ERROR,tape:/dev/st2}"
329 </programlisting>
330 This will cause the RAIT device to start up in degraded mode, reconstructing the data from the missing device.
331 </para>
332
333 <para>Like ordinary RAID drivers, the RAIT device driver can automatically
334 enter degraded mode when one of its child devices fails.  However, the RAIT
335 device cannot automatically recover from any write error nor write any data in
336 degraded mode.  When reading, certain errors may be fatal (rather than causing
337 degraded mode).  And in any case, labels on all volumes must initially match
338 (labeled or otherwise).  If you have lost one volume from a set, explicitly
339 start the device in degraded mode as described above.</para>
340
341 <para>This device can detect LEOM if and only if all of the child devices can detect LEOM.</para>
342
343 <refsect3><title>Child Device Block Sizes</title>
344
345 <para>The RAIT device driver requires that all of its child devices use the
346 same block size.  If no block sizes are specified, the driver selects the block
347 size closest to 32k that is within the MIN_BLOCK_SIZE - MAX_BLOCK_SIZE range of
348 all child devices, and calculates its own blocksize according to the formula
349 <emphasis>rait_blocksize = child_blocksize * (num_children - 1)</emphasis>.  If
350 a block size is specified for the RAIT device, then it calculates its child
351 block sizes according to the formula <emphasis>child_blocksize = rait_blocksize
352 / (num_children - 1)</emphasis>.  Either way, it sets the BLOCK_SIZE property
353 of each child device accordingly.</para>
354
355 </refsect3>
356
357 </refsect2>
358
359 <refsect2><title>S3 Device</title>
360 <programlisting>
361 tapedev "s3:foocorp-backups/DailySet1-"
362 device-property "S3_ACCESS_KEY" "MYACCESSKEY"
363 device-property "S3_SECRET_KEY" "MYSECRETKEY"
364 </programlisting>
365
366 <para>The S3 device driver uploads data to the Amazon S3 "storage cloud".  Its
367 device name is a slash-sparated combination of bucket name and prefix:
368 "s3:BUCKET/PREFIX".  Since buckets must be unique across all Amazon S3 users,
369 and since the number of buckets allowed to each user is limited, the driver can
370 store multiple Amanda volumes in a single S3 bucket, distinguished by prefix.
371 The prefix and slash can be omitted if they are not needed: "s3:BUCKET".</para>
372
373 <para>The access and secret keys used to authenticate to Amazon S3 are provided
374 as properties.</para>
375
376 <para>The S3 device driver stores each block in a distinct S3 object.  Due to
377 high HTTP overhead for each request, use of larger than normal block
378   sizes (&gt; 1 megabyte) is recommended with the S3 device.</para>
379
380 <para>
381 Amanda automatically creates a bucket when writing, if the bucket doesn't
382 already exist. At that time, it specifies where Amazon should store the data
383 based on the S3_BUCKET_LOCATION property. If this property is not set,
384 Amazon's default value (equivalent to "*") is used. The bucket location has both billing and
385 legal concerns, so you are encouraged to consult Amazon's documentation for details.
386 </para>
387
388 <para>
389 Amazon does not permit changes to bucket locations, so this is a permanent
390 specification. If the bucket already exists and the property is set,
391 then Amanda checks the property against the location of the bucket, and
392 produces an error if they do not match.
393 </para>
394
395 <note><para>
396 If a location constraint is set, the bucket name must consist only of
397 lower-case letters, numbers, dashes, and dots.
398 </para></note>
399
400 <para>This driver supports the VERBOSE property, but use it carefully -- it
401 produces a great deal of output, and may cause spurious failures by filling
402 your debug log partition.  Its logging is generally only useful for developers
403 chasing down a problem in communications with Amazon's servers.</para>
404
405 <para>Since Amazon storage is unlimited, the device never encounteres EOM, so
406 LEOM detection is trivially enabled for this device.</para>
407
408 <para>This driver supports the ENFORCE_MAX_VOLUME_USAGE property. Default value is false. See COMMON_PROPERTIES, above.</para>
409
410 <refsect3><title>Device-Specific Properties</title>
411
412 <para>In addition to the common properties, the S3 device supports the
413 properties listed in this section.</para>
414
415 <para>Most Amanda devices work just fine without any properties, but not the S3
416 device.  A typical S3 configuration will have an access key and secret key
417 specified:
418
419 <programlisting>
420 device-property "S3_ACCESS_KEY" "27D3B8C6C4E7AA423C2B37C72A0D22C8"
421 device-property "S3_SECRET_KEY" "agphc2Q7Zmxragphc2RmO2xragpzZGY7a2xqCgr"
422 </programlisting></para>
423
424 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
425 <variablelist>
426  <!-- ==== -->
427  <varlistentry><term>CLIENT_ID</term><listitem>
428 (read-write) The client_id for oauth2.
429 </listitem></varlistentry>
430  <!-- ==== -->
431  <varlistentry><term>CLIENT_SECRET</term><listitem>
432 (read-write) The client_secret for oauth2.
433 </listitem></varlistentry>
434  <!-- ==== -->
435  <varlistentry><term>CREATE-BUCKET</term><listitem>
436 (read-write) Default: yes. If amanda create/delete the bucket.
437 </listitem></varlistentry>
438  <!-- ==== -->
439  <varlistentry><term>REFRESH_TOKEN</term><listitem>
440 (read-write) The refresh-token for oauth2.
441 </listitem></varlistentry>
442  <!-- ==== -->
443  <varlistentry><term>MAX_RECV_SPEED</term><listitem>
444 (read-write) Maximum speed, in bytes per second, that this device will receive
445 data from S3.  If the average speed exceeds this value, the device will stop
446 reading long enough to bring the average below this value.
447 </listitem></varlistentry>
448  <!-- ==== -->
449  <varlistentry><term>MAX_SEND_SPEED</term><listitem>
450 (read-write) Maximum speed, in bytes per second, that this device will send
451 data to S3.  If the average speed exceeds this value, the device will stop
452 writing long enough to bring the average below this value.
453 </listitem></varlistentry>
454  <!-- ==== -->
455  <varlistentry><term>S3_MULTI_DELETE</term><listitem>
456 (read-write) If the server support the multi delete protocol (only Amazon S3),
457 default is "YES". If it fail, it revert to single delete.
458 </listitem></varlistentry>
459  <!-- ==== -->
460  <varlistentry><term>NB_THREADS_BACKUP</term><listitem>
461 (read-write) The number of thread that send data to the s3 device, higher value can provide more throutput.
462 </listitem></varlistentry>
463  <!-- ==== -->
464  <varlistentry><term>NB_THREADS_RECOVERY</term><listitem>
465 (read-write) The number of thread that read data from the s3 device, higher value can provide more throutput.
466 </listitem></varlistentry>
467  <!-- ==== -->
468  <varlistentry><term>OPENSTACK_SWIFT_API</term><listitem>
469  (read-write) Deprecated, set "STORAGE_API to "SWIFT-1.0".
470 </listitem></varlistentry>
471  <!-- ==== -->
472  <varlistentry><term>PROXY</term><listitem>
473  (read-write) The proxy hostname or IP in the format "host[:port]".
474 </listitem></varlistentry>
475  <!-- ==== -->
476  <varlistentry><term>PASSWORD</term><listitem>
477 (read-write) The password (for swift v2).
478 </listitem></varlistentry>
479  <!-- ==== -->
480  <varlistentry><term>PROJECT-ID</term><listitem>
481 (read-write) The projectid (for google).
482 </listitem></varlistentry>
483  <!-- ==== -->
484  <varlistentry><term>REUSE-CONNECTION</term><listitem>
485 (read-write) Default: YES. Set it to "NO" if reusing a connection cause some bug, this is sometime the case with big block size.
486 </listitem></varlistentry>
487  <!-- ==== -->
488  <varlistentry><term>S3_ACCESS_KEY</term><listitem>
489  (read-write) This property gives the Amazon S3 access key used to access the service.
490 </listitem></varlistentry>
491  <!-- ==== -->
492  <varlistentry><term>S3_BUCKET_LOCATION</term><listitem>
493  (read-write) Location constraint for buckets on Amazon S3.
494 As of this writing, it can be set to "*" (US Standard, i.e. lowest-latency
495 choice of US East or West), "us-west-1" (US West, Northern California), "EU"
496 (European Union), or "ap-southeast-1" (Asia Pacific).  See <ulink
497 url="http://docs.amazonwebservices.com/general/latest/gr/index.html?rande.html"
498 /> for the most up-to-date list.
499 </listitem></varlistentry>
500  <!-- ==== -->
501  <varlistentry><term>SSL_CA_INFO</term><listitem>
502  (read-write) Path to CA certificate to use to verify the identity of the S3 server.
503 Only applicable when SSL/TLS is in use. The certificate should be in PEM format
504 if OpenSSL or GnuTLS is being used with libcurl. Multiple certificates can be
505 bundled together simply by concatenating them.
506 If NSS is being used, then it is the directory that the database resides in.
507 The value is passed to curl_easy_setopt(3) as CURLOPT_CAINFO.
508 </listitem></varlistentry>
509  <!-- ==== -->
510  <varlistentry><term>S3_HOST</term><listitem>
511 (read-write) The host name to connect, in the form "hostname:port" or "ip:port", default is "s3.amazonaws.com"
512 </listitem></varlistentry>
513  <!-- ==== -->
514  <varlistentry><term>S3_SECRET_KEY</term><listitem>
515 (read-write) This property gives the Amazon S3 secret key used to access the service.
516 </listitem></varlistentry>
517  <!-- ==== -->
518  <varlistentry><term>S3_SERVER_SIDE_ENCRYPTION</term><listitem>
519 (read-write) Set to the server side encryption algorithm to use.
520 There is actually only one algorithm, it is "AES256".  The encryption is done
521 by Amazon on their server. See
522 <ulink url="http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?RESTObjectPUT.html" />
523 for the most up-to-date list.
524 </listitem></varlistentry>
525  <!-- ==== -->
526  <varlistentry><term>S3_SERVICE_PATH</term><listitem>
527 (read-write) A path to add at the beginning of the URL.
528 </listitem></varlistentry>
529  <!-- ==== -->
530  <varlistentry><term>S3_STORAGE_CLASS</term><listitem>
531 (read-write) Storage class for new objects, currently one of "STANDARD" (the default)
532 or "REDUCED_REDUNDANCY" (cheaper, but less redundant).  See
533 <ulink url="http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?DataDurability.html" />
534 for the most up-to-date list.
535 </listitem></varlistentry>
536  <!-- ==== -->
537  <varlistentry><term>S3_SSL</term><listitem>
538 (read-write) Whether or not to use SSL/TLS to secure communications with Amazon S3.
539 </listitem></varlistentry>
540  <!-- ==== -->
541  <varlistentry><term>S3_SUBDOMAIN</term><listitem>
542  (read-write) Whether or not to use subdomain hostname.
543 </listitem></varlistentry>
544  <!-- ==== -->
545  <varlistentry><term>S3_USER_TOKEN</term><listitem>
546 (read-write) This property specifies the user token for Amanda Enterprise Edition customers.
547 </listitem></varlistentry>
548  <!-- ==== -->
549  <varlistentry><term>STORAGE_API</term><listitem>
550  (read-write) Which API to use for the cloud:
551 <programlisting>
552   S3            Amanzon S3 api
553   SWIFT-1.0     Openstack swift v1.0
554   SWIFT-2.0     Openstack swift v2.0
555   OAUTH2        Google
556   CASTOR        Caringo CAStor
557 </programlisting>
558 </listitem></varlistentry>
559  <!-- ==== -->
560  <varlistentry><term>TENANT_ID</term><listitem>
561 (read-write) The tenant_id (for swift v2).
562 </listitem></varlistentry>
563  <!-- ==== -->
564  <varlistentry><term>TENANT_NAME</term><listitem>
565 (read-write) The tenant_name (for swift v2).
566 </listitem></varlistentry>
567  <!-- ==== -->
568  <varlistentry><term>USERNAME</term><listitem>
569 (read-write) The username (for swift v2).
570 </listitem></varlistentry>
571  <!-- ==== -->
572  <varlistentry><term>VERBOSE</term><listitem>
573 (read-write) If true, verbose data about each HTTP transaction is sent to the debug log.
574 </listitem></varlistentry>
575  <!-- ==== -->
576 </variablelist>
577
578 </refsect3>
579 <refsect3><title>S3 URL</title>
580      SSL &amp;&amp;  SUBDOMAIN:   https://bucket.host/service_path/file
581      SSL &amp;&amp; !SUBDOMAIN:   https://host/service_path/bucket/file
582     !SSL &amp;&amp;  SUBDOMAIN:   http://bucket.host/service_path/file
583     !SSL &amp;&amp; !SUBDOMAIN:   http://host/service_path/bucket/file
584 </refsect3>
585
586 </refsect2>
587
588 <refsect2><title>Tape Device</title>
589 <programlisting>
590 tapedev "tape:/dev/nst0"
591 </programlisting>
592
593 <para>The tape device driver interacts with a tape drive.  The device uses the
594 operating system's built-in tape support, which is generally similar to that
595 available via the command-line utilities dd(1) and mt(1).</para>
596
597 <para>The tape device name should specify a path to the operating system's
598 device file.</para>
599
600 <para>There is no simple way to determine whether a particular system
601 (operating system and tape hardware) supports LEOM, so as a safe default
602 the tape device has LEOM detection disabled.  However, on modern hardware
603 and common operating systems (Linux, *BSD, and Solaris, at least), LEOM
604 support is functional.  On these systems, enable LEOM by setting the LEOM
605 property to "true" at the appropriate place in the Amanda
606 configuration.</para>
607
608 <refsect3><title>Device-Specific Properties</title>
609
610 <para>Most of these properties are automatically detected, but can be
611 overridden in the configuration file if the autodetection fails. Note that tape
612 drives are required to at least support the MTREW (rewind) operation; all other
613 operations can be emulated with the MTREW and read data operations.</para>
614
615 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
616 <variablelist>
617  <!-- ==== -->
618  <varlistentry><term>BROKEN_GMT_ONLINE</term><listitem>
619  (read-write) Set this boolean property if the system's GMT_ONLINE macro gives incorrect results.  This is currently true for the Linux IDE-TAPE driver.
620 </listitem></varlistentry>
621  <!-- ==== -->
622  <varlistentry><term>BSF</term><listitem>
623  (read-write) This boolean property specifies whether the device
624  driver may execute the MTBSF operation (backward seek file).
625 </listitem></varlistentry>
626  <!-- ==== -->
627  <varlistentry><term>BSF_AFTER_EOM</term><listitem>
628  (read-write) This boolean property specifies whether the device
629  driver should execute an MTBSF (backward seek file) operation after
630  MTEOM (seek to end of recorded data) in order to append.
631 </listitem></varlistentry>
632  <!-- ==== -->
633  <varlistentry><term>BSR</term><listitem>
634  (read-write) This boolean property specifies whether the device
635  driver may use the MTBSR operation (backward seek record).
636 </listitem></varlistentry>
637  <!-- ==== -->
638  <varlistentry><term>EOM</term><listitem>
639  (read-write) This boolean property specifies whether the device
640  driver may use the MTEOM command (seek to end of recorded data).
641 </listitem></varlistentry>
642  <!-- ==== -->
643  <varlistentry><term>FINAL_FILEMARKS</term><listitem>
644  (read-write) This integer property gives the number of filemarks that should be written at EOD.  It is usually 1 or 2.
645 </listitem></varlistentry>
646  <!-- ==== -->
647  <varlistentry><term>FSF</term><listitem>
648  (read-write) This boolean property specifies whether the device driver may use the MTFSF operation (forward seek file).
649 </listitem></varlistentry>
650  <!-- ==== -->
651  <varlistentry><term>FSF_AFTER_FILEMARK</term><listitem>
652  (read-write) This boolean property specifies whether the device driver needs a FSF to go the next file after the filemark is read. Default to "TRUE" on Solaris and "FALSE" on all others machines.
653 </listitem></varlistentry>
654  <!-- ==== -->
655  <varlistentry><term>FSR</term><listitem>
656  (read-write) This boolean property specifies whether the device driver may use the MTFSR operation (forward seek record).
657 </listitem></varlistentry>
658  <!-- ==== -->
659  <varlistentry><term>NONBLOCKING_OPEN</term><listitem>
660  (read-write) Set this boolean property to "true" if O_NONBLOCK must be used on the open call. Default to "true" on Linux and "false" on all others machines. Without it, Linux wait for a few seconds if no tape are loaded. Solaris have strange error it is set to "yes".
661 </listitem></varlistentry>
662  <!-- ==== -->
663  <varlistentry><term>READ_BLOCK_SIZE</term><listitem>
664  (read-write) This property (previously known as <emphasis>READ_BUFFER_SIZE</emphasis>) specifies the block size that will be used for reads; this should be large enough to contain any block that may be read from the device (for example, from a tape containing variable-sized blocks), and must be larger than BLOCK_SIZE.  This property is most often used when overwriting tapes using a new, smaller block size.
665  The tapetype parameter <emphasis>READBLOCKSIZE</emphasis> sets this property.  See BLOCK SIZES, above.
666 </listitem></varlistentry>
667  <!-- ==== -->
668 </variablelist>
669
670 </refsect3>
671
672 </refsect2>
673
674 <refsect2><title>NDMP Device</title>
675 <programlisting>
676 tapedev "ndmp:my.filer.com:10000@st1"
677 device-property "NDMP_USERNAME" "jimmy"
678 device-property "NDMP_PASSWORD" "thelock"
679 </programlisting>
680
681 <para>This device enables Amanda to communicate with a tape service on an NDMP
682 server.  The device name specifies the hostname and optionally the TCP port of
683 the NDMP server, followed by the name of the tape device on the server
684 (<command>st1</command> in the example above).</para>
685
686 <para>This device supports LEOM detection.</para>
687
688 <refsect3><title>Device-Specific Properties</title>
689
690 <para>The properties <command>NDMP_USERNAME</command> and
691 <command>NDMP_PASSWORD</command> set the username and password with which to
692 access the NDMP server.  The default for both is "ndmp".</para>
693
694 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
695 <variablelist>
696  <!-- ==== -->
697 <varlistentry><term>INDIRECT</term><listitem>
698 (read-write) Set to "yes" if the ndmp server doesn't allow to set a window length to 0.
699 The default is "no".
700 </listitem></varlistentry>
701  <!-- ==== -->
702 <varlistentry><term>NDMP_AUTH</term><listitem>
703 (read-write) Authentication method to use to connect to the NDMP server.  One of
704 "md5" (default), "text", "none" (for an empty authentication attempt) or "void" (for
705 no authentication attempt at all).
706 </listitem></varlistentry>
707  <!-- ==== -->
708 <varlistentry><term>NDMP_PASSWORD</term><listitem>
709 (read-write) Password for md5 or text authentications.
710 </listitem></varlistentry>
711  <!-- ==== -->
712 <varlistentry><term>NDMP_USERNAME</term><listitem>
713 (read-write) Username for md5 or text authentications.
714 </listitem></varlistentry>
715  <!-- ==== -->
716 <varlistentry><term>READ_BLOCK_SIZE</term><listitem>
717 (read-write) This property specifies the block size that will be used for reads; this should be large enough to contain any block that may be read from the device and must be larger than BLOCK_SIZE. See BLOCK_SIZES, above.
718 </listitem></varlistentry>
719  <!-- === -->
720 </variablelist>
721
722 </refsect3>
723
724 </refsect2>
725
726 <refsect2><title>VFS Device</title>
727 <programlisting>
728 tapedev "file:/path/to/vtape"
729 </programlisting>
730
731 <para>The VFS device driver stores data on a UNIX filesystem. Note
732   that although one typically uses the VFS device driver to store data
733   on hard disks, the driver does not interface with any hardware on a
734   block level.</para>
735
736 <para>The device name specifies a path to a directory which must exist and
737 contain a "data/" subdirectory.  Each tape file is stored as a distinct file in
738 this directory, the name of which reflects the Amanda header in the tape file.
739 Block boundaries are not maintained: the driver supports reads of arbitrary
740 size, regardless of the blocksize used to write the data.</para>
741
742 <para>This device supports LEOM detection.  LEOM will be indicated when the
743     MAX_VOLUME_USAGE is nearly met, or when the filesystem is nearly out of
744     space.  The latter circumstance is detected by monitoring the available
745     space on the filesystem, and this monitoring can be disabled with the
746     MONITOR_FREE_SPACE property.  Note that the device cannot detect other
747     circumstances that may cause a write to fail, such as a filesystem quota.
748     LEOM detection can be disabled by setting the LEOM property to
749     false.</para>
750
751 <para>This device supports the ENFORCE_MAX_VOLUME_USAGE property. Default value is true. See COMMON PROPERTIES, above.</para>
752 <refsect3><title>Device-Specific Properties</title>
753
754 <variablelist>
755  <varlistentry><term>MONITOR_FREE_SPACE</term><listitem>
756          (read-write) This property controls whether the device will monitor
757          the filesystem's free space to detect a full filesystem before an
758          error occurs, and defaults to true.  The monitoring operation works on
759          most filesystems, but if it causes problems, use this property to
760          disable it.
761 </listitem></varlistentry>
762 </variablelist>
763
764 </refsect3>
765
766 </refsect2>
767
768 <refsect2><title>DVD-RW Device</title>
769 <programlisting>
770 tapedev "dvdrw:/var/cache/amanda/dvd-cache:/dev/scd0"
771 device-property "DVDRW_MOUNT_POINT" "/media/dvd"
772 device-property "DVDRW_KEEP_CACHE" "false"
773 device-property "DVDRW_UNLABELLED_WHEN_UNMOUNTABLE" "true"
774 </programlisting>
775
776 <para>The DVD-RW device driver reads and writes optical media such as DVDs and
777 CDs. The device name must specify a cache directory for data to be temporarily
778 stored, followed by the operating system name for the optical drive. The cache
779 directory must contain a "data/" subdirectory.</para>
780
781 <para>The DVDRW_MOUNT_POINT property is required, and specifies a directory
782 where the optical media can be mounted. This directory must be configured to
783 enable non-root users to mount the optical media. On Linux, that means a line
784 similar to the following in /etc/fstab:</para>
785 <programlisting>
786 /dev/scd0 /media/dvd auto ro,user,noauto 0 0
787 </programlisting>
788
789 <para>Note the "user" option.</para>
790
791 <para>When writing data, the device acts as a VFS device using the given cache
792 directory. On completion of writing the tape, the cache directory is written
793 to optical media. The DVDRW_KEEP_CACHE property controls whether the cache
794 contents are immediately deleted. When reading, the optical media is first
795 mounted and read as a VFS device.</para>
796
797 <para>Attempting to mount unformatted media or media that is formatted but
798 contains no filesystem will usually result in an error. The boolean
799 DVDRW_UNLABELLED_WHEN_UNMOUNTABLE property specifies whether media that cannot
800 be mounted should be treated as an empty, unlabelled volume when attempting to
801 read the volume label. It is necessary to set this property to "true" when
802 labelling such media.</para>
803
804 <para>This device does not support LEOM detection.</para>
805
806 <refsect3><title>Device-Specific Properties</title>
807
808 <para>The properties DVDRW_GROWISOFS_COMMAND, DVDRW_MOUNT_COMMAND and
809 DVDRW_UMOUNT_COMMAND specify alternative commands for writing, mounting and
810 unmounting optical media. The default is to find the programs using the PATH
811 environment variable.</para>
812
813 <para>The CDRW device supports all of the properties of the VFS device, as well
814     as the properties given below.  The DVDRW_MOUNT_POINT property is required.
815     Other properties are optional.</para>
816
817 <variablelist>
818  <varlistentry><term>DVDRW_KEEP_CACHE</term><listitem>
819  (read-write) Set this boolean property to "true" if the disk cache directory should be kept after successfully writing tape data to optical media. The default is false, which causes the cache contents to be deleted immediately after a successful write operation.
820 </listitem></varlistentry>
821  <varlistentry><term>DVDRW_MOUNT_POINT</term><listitem>
822  (read-write) This property specifies the filesystem mount point for the optical media. Non-root users must be able to mount optical media by invoking "mount" and specifying this mount point.
823 </listitem></varlistentry>
824  <varlistentry><term>DVDRW_UNLABELLED_WHEN_UNMOUNTABLE</term><listitem>
825  (read-write) Treat unmountable media as empty, unlabelled media. This is necessary when attempting to label freshly formatted media.
826 </listitem></varlistentry>
827  <varlistentry><term>DVDRW_GROWISOFS_COMMAND</term><listitem>
828  (read-write) The command to invoke to burn the DVD.
829 </listitem></varlistentry>
830  <varlistentry><term>DVDRW_MOUNT_COMMAND</term><listitem>
831  (read-write) The command to invoke to mount the DVD.
832 </listitem></varlistentry>
833  <varlistentry><term>DVDRW_UMOUNT_COMMAND</term><listitem>
834  (read-write) The command to invoke to unmount the DVD.
835 </listitem></varlistentry>
836 </variablelist>
837
838 </refsect3>
839
840 </refsect2>
841
842 </refsect1>
843
844 <seealso>
845 <manref name="amanda.conf" vol="5"/>,
846 </seealso>
847
848 </refentry>