2 \chapter{Autochanger Resource}
3 \index[sd]{Autochanger Resource}
4 \index[sd]{Resource!Autochanger}
6 The Autochanger resource supports single or multiple drive
7 autochangers by grouping one or more Device resources
8 into one unit called an autochanger in Bacula (often referred to
9 as a "tape library" by autochanger manufacturers).
11 If you have an Autochanger, and you want it to function correctly,
12 you {\bf must} have an Autochanger resource in your Storage
13 conf file, and your Director's Storage directives that want to
14 use an Autochanger {\bf must} refer to the Autochanger resource name.
15 In previous versions of Bacula, the Director's Storage directives
16 referred directly to Device resources that were autochangers.
17 In version 1.38.0 and later, referring directly to Device resources
18 will not work for Autochangers.
21 \item [Name = \lt{}Autochanger-Name\gt{}]
23 Specifies the Name of the Autochanger. This name is used in the
24 Director's Storage definition to refer to the autochanger. This
25 directive is required.
27 \item [Device = \lt{}Device-name1, device-name2, ...\gt{}]
28 Specifies the names of the Device resource or resources that correspond
29 to the autochanger drive. If you have a multiple drive autochanger, you
30 must specify multiple Device names, each one referring to a separate
31 Device resource that contains a Drive Index specification that
32 corresponds to the drive number base zero. You may specify multiple
33 device names on a single line separated by commas, and/or you may
34 specify multiple Device directives. This directive is required.
36 \item [Changer Device = {\it name-string}]
37 \index[sd]{Changer Device}
38 The specified {\bf name-string} gives the system file name of the autochanger
39 device name. If specified in this resource, the Changer Device name
40 is not needed in the Device resource. If it is specified in the Device
41 resource (see above), it will take precedence over one specified in
42 the Autochanger resource.
44 \item [Changer Command = {\it name-string}]
45 \index[sd]{Changer Command }
46 The {\bf name-string} specifies an external program to be called that will
47 automatically change volumes as required by {\bf Bacula}. Most frequently,
48 you will specify the Bacula supplied {\bf mtx-changer} script as follows.
49 If it is specified here, it need not be specified in the Device
50 resource. If it is also specified in the Device resource, it will take
51 precedence over the one specified in the Autochanger resource.
55 The following is an example of a valid Autochanger resource definition:
60 Name = "DDS-4-changer"
61 Device = DDS-4-1, DDS-4-2, DDS-4-3
62 Changer Device = /dev/sg0
63 Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
86 Please note that it is important to include the {\bf Autochanger = yes} directive
87 in each Device definition that belongs to an Autochanger. A device definition
88 should not belong to more than one Autochanger resource. Also, your Device
89 directive in the Storage resource of the Director's conf file should have
90 the Autochanger's resource name rather than a name of one of the Devices.
92 If you have a drive that physically belongs to an Autochanger but you don't want
93 to have it automatically used when Bacula references the Autochanger for backups,
94 for example, you want to reserve it for restores, you can add the directive:
102 to the Device resource for that drive. In that case, Bacula will not automatically
103 select that drive when accessing the Autochanger. You can, still use the drive
104 by referencing it by the Device name directly rather than the Autochanger name. An example
105 of such a definition is shown above for the Device DDS-4-3, which will not be
106 selected when the name DDS-4-changer is used in a Storage definition, but will
107 be used if DDS-4-3 is used.