1
\subsection*{Autochanger Resource}
2
\index[sd]{Autochanger Resource }
3
\index[sd]{Resource!Autochanger }
4
\addcontentsline{toc}{subsection}{Autochanger Resource}
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
24
the Director's Storage definition to refer to the autochanger.
25
This directive is required.
27
\item [Device = \lt{}Device-name1, device-name2, ...\gt{}]
28
Specifies the names of the Device resource or
29
resources that correspond
30
to the autochanger drive. If you have a multiple drive
31
autochanger, you must specify multiple Device names, each
32
one referring to a separate Device resource that contains a the
33
Drive Index specification that corresponds to the drive
34
number. You may specify multiple device names on
35
a single line separated by commas, and/or you may specify
36
multiple Device directives.
37
This directive is required.
39
\item [Changer Device = {\it name-string}]
40
\index[sd]{Changer Device}
41
The specified {\bf name-string} gives the system file name of the autochanger
42
device name. If specified in this resource, the Changer Device name
43
is not needed in the Device resource. If it is specified in the Device
44
resource (see above), it will take precedence over one specified in
45
the Autochanger resource.
47
\item [Changer Command = {\it name-string}]
48
\index[sd]{Changer Command }
49
The {\bf name-string} specifies an external program to be called that will
50
automatically change volumes as required by {\bf Bacula}. Most frequently,
51
you will specify the Bacula supplied {\bf mtx-changer} script as follows.
52
If it is specified here, it need not be specified in the Device
53
resource. If it is also specified in the Device resource, it will take
54
precedence over the one specified in the Autochanger resource.
58
The following is an example of a valid Autochanger resource definition:
63
Name = "DDS-4-changer"
64
Device = DDS-4-1, DDS-4-2, DDS-4-3
65
Changer Device = /dev/sg0
66
Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
89
Please note that it is important to include the {\bf Autochanger = yes} directive
90
in each Device definition that belongs to an Autochanger. A device definition
91
should not belong to more than one Autochanger resource. Also, your Device
92
directive in the Storage resource of the Director's conf file should have
93
the Autochanger's resource name rather than a name of one of the Devices.
95
If you have a drive that physically belongs to an Autochanger but you don't want
96
to have it automatically used when Bacula references the Autochanger for backups,
97
for example, you want to reserve it for restores, you can add the directive:
105
to the Device resource for that drive. In that case, Bacula will not automatically
106
select that drive when accessing the Autochanger. You can, still use the drive
107
by referencing it by the Device name directly rather than the Autochanger name. An example
108
of such a definition is shown above for the Device DDS-4-3, which will not be
109
selected when the name DDS-4-changer is used in a Storage definition, but will
110
be used if DDS-4-3 is used.