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