]> git.sur5r.net Git - bacula/docs/blob - docs/manual/autochangerres.tex
ebl fix runscript doc
[bacula/docs] / docs / manual / autochangerres.tex
1 \chapter{Autochanger Resource}
2 \index[sd]{Autochanger Resource }
3 \index[sd]{Resource!Autochanger }
4
5 The Autochanger resource supports single or multiple drive
6 autochangers by grouping one or more Device resources     
7 into one unit called an autochanger in Bacula (often referred to
8 as a "tape library" by autochanger manufacturers).
9
10 If you have an Autochanger, and you want it to function correctly,
11 you {\bf must} have an Autochanger resource in your Storage
12 conf file, and your Director's Storage directives that want to
13 use an Autochanger {\bf must} refer to the Autochanger resource name.
14 In previous versions of Bacula, the Director's Storage directives
15 referred directly to Device resources that were autochangers.     
16 In version 1.38.0 and later, referring directly to Device resources
17 will not work for Autochangers.
18
19 \begin{description}
20 \item [Name = \lt{}Autochanger-Name\gt{}]
21    \index[sd]{Name}
22    Specifies the Name of the Autochanger. This name is used in
23    the Director's Storage definition to refer to the autochanger.
24    This directive is required.  
25
26 \item [Device = \lt{}Device-name1, device-name2, ...\gt{}]
27    Specifies the names of the Device resource or
28    resources that correspond
29    to the autochanger drive.  If you have a multiple drive
30    autochanger, you must specify multiple Device names, each
31    one referring to a separate Device resource that contains a  
32    Drive Index specification that corresponds to the drive
33    number base zero. You may specify multiple device names on
34    a single line separated by commas, and/or you may specify
35    multiple Device directives.
36    This directive is required.  
37
38 \item [Changer Device = {\it name-string}]
39    \index[sd]{Changer Device}
40    The specified {\bf name-string} gives the system file name of the  autochanger
41    device name. If specified in this resource, the Changer Device name
42    is not needed in the Device resource. If it is specified in the Device
43    resource (see above), it will take precedence over one specified in
44    the Autochanger resource.
45
46 \item [Changer Command = {\it name-string}]
47    \index[sd]{Changer Command  }
48    The {\bf name-string} specifies an external program to be called  that will
49    automatically change volumes as required by {\bf Bacula}.  Most frequently,
50    you will specify the Bacula supplied {\bf mtx-changer}  script as follows.
51    If it is specified here, it need not be specified in the Device
52    resource. If it is also specified in the Device resource, it will take
53    precedence over the one specified in the Autochanger resource.
54
55 \end{description}
56
57 The following is an example of a valid Autochanger resource definition: 
58
59 \footnotesize
60 \begin{verbatim}
61 Autochanger {
62   Name = "DDS-4-changer"
63   Device = DDS-4-1, DDS-4-2, DDS-4-3
64   Changer Device = /dev/sg0
65   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
66 }
67 Device {
68   Name = "DDS-4-1"
69   Drive Index = 0
70   Autochanger = yes
71   ...
72 }
73 Device {
74   Name = "DDS-4-2"
75   Drive Index = 1
76   Autochanger = yes
77   ...
78 Device {
79   Name = "DDS-4-3"
80   Drive Index = 2
81   Autochanger = yes
82   Autoselect = no
83   ...
84 }
85 \end{verbatim}
86 \normalsize
87
88 Please note that it is important to include the {\bf Autochanger = yes} directive
89 in each Device definition that belongs to an Autochanger.  A device definition
90 should not belong to more than one Autochanger resource.  Also, your Device
91 directive in the Storage resource of the Director's conf file should have
92 the Autochanger's resource name rather than a name of one of the Devices.
93
94 If you have a drive that physically belongs to an Autochanger but you don't want
95 to have it automatically used when Bacula references the Autochanger for backups,
96 for example, you want to reserve it for restores, you can add the directive:
97
98 \footnotesize
99 \begin{verbatim}
100 Autoselect = no
101 \end{verbatim}
102 \normalsize
103
104 to the Device resource for that drive. In that case, Bacula will not automatically
105 select that drive when accessing the Autochanger. You can, still use the drive
106 by referencing it by the Device name directly rather than the Autochanger name. An example
107 of such a definition is shown above for the Device DDS-4-3, which will not be
108 selected when the name DDS-4-changer is used in a Storage definition, but will
109 be used if DDS-4-3 is used.