]> git.sur5r.net Git - bacula/docs/blob - docs/manual/storedconf.tex
Update
[bacula/docs] / docs / manual / storedconf.tex
1 %%
2 %%
3
4 \section*{Storage Daemon Configuration}
5 \label{_ChapterStart31}
6 \index[general]{Storage Daemon Configuration}
7 \index[general]{Configuration!Storage Daemon}
8 \addcontentsline{toc}{section}{Storage Daemon Configuration}
9
10 \subsection*{General}
11 \index[general]{General}
12 \addcontentsline{toc}{subsection}{General}
13
14 The Storage Daemon configuration file has relatively few resource definitions.
15 However, due to the great variation in backup media and system capabilities,
16 the storage daemon must be highly configurable. As a consequence, there are
17 quite a large number of directives in the Device Resource definition that
18 allow you to define all the characteristics of your Storage device (normally a
19 tape drive). Fortunately, with modern storage devices, the defaults are
20 sufficient, and very few directives are actually needed. 
21
22 Examples of {\bf Device} resource directives that are known to work for a
23 number of common tape drives can be found in the {\bf
24 \lt{}bacula-src\gt{}/examples/devices} directory, and most will also be listed
25 here. 
26
27 For a general discussion of configuration file and resources including the
28 data types recognized by {\bf Bacula}, please see the 
29 \ilink{Configuration}{_ChapterStart16} chapter of this manual. The
30 following Storage Resource definitions must be defined: 
31
32 \begin{itemize}
33 \item 
34    \ilink{Storage}{StorageResource} -- to define the  name of the
35    Storage daemon.  
36 \item 
37    \ilink{Director}{DirectorResource1} -- to  define the Director's
38    name and his access password.  
39 \item 
40    \ilink{Device}{DeviceResource} -- to define  the
41    characteristics of your storage device (tape  drive).  
42 \item 
43    \ilink{Messages}{_ChapterStart15} -- to define where error  and
44    information messages are to be sent. 
45 \end{itemize}
46
47 \subsection*{Storage Resource}
48 \label{StorageResource}
49 \index[general]{Resource!Storage}
50 \index[general]{Storage Resource}
51 \addcontentsline{toc}{subsection}{Storage Resource}
52
53 In general, the properties specified under the Storage resource define global
54 properties of the Storage daemon. Each Storage daemon configuration file must
55 have one and only one Storage resource definition. 
56
57 \begin{description}
58
59 \item [Name = \lt{}Storage-Daemon-Name\gt{}]
60    \index[sd]{Name }
61    Specifies the Name of the Storage daemon. This  directive is required. 
62
63 \item [Working Directory = \lt{}Directory\gt{}]
64    \index[sd]{Working Directory }
65    This directive  is mandatory and specifies a directory in which the Storage
66    daemon  may put its status files. This directory should be used only  by {\bf
67    Bacula}, but may be shared by other Bacula daemons provided the names
68    given to each daemon are unique. This  directive is
69    required  
70
71 \item [Pid Directory = \lt{}Directory\gt{}]
72    \index[sd]{Pid Directory }
73    This directive  is mandatory and specifies a directory in which the Director 
74    may put its process Id file files. The process Id file is used to  shutdown
75    Bacula and to prevent multiple copies of  Bacula from running simultaneously. 
76    This directive is required. Standard shell expansion of the {\bf Directory} 
77    is done when the configuration file is read so that values such  as {\bf
78    \$HOME} will be properly expanded.  
79
80    Typically on Linux systems, you will set this to:  {\bf /var/run}. If you are
81    not installing Bacula in the  system directories, you can use the {\bf Working
82    Directory} as  defined above. 
83
84 \item [Heartbeat Interval = \lt{}time-interval\gt{}]
85    \index[sd]{Heartbeat Interval }
86    \index[general]{Heartbeat Interval}
87    \index[general]{Broken pipe}
88    This directive defines an interval of time.  When the Storage daemon is
89    waiting for the operator to mount a tape, each time interval, it will
90    send a heartbeat signal to the File daemon.  The default interval is
91    zero which disables the heartbeat.  This feature is particularly useful
92    if you have a router such as 3Com that does not follow Internet
93    standards and times out an valid connection after a short duration 
94    despite the fact that keepalive is set. This usually results
95    in a broken pipe error message.
96
97 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
98    \index[sd]{Maximum Concurrent Jobs}
99    where \lt{}number\gt{} is the maximum number of Jobs that should run
100    concurrently.  The default is set to 10, but you may set it to a larger
101    number.  Each contact from the Director (e.g.  status request, job start
102    request) is considered as a Job, so if you want to be able to do a {\bf
103    status} request in the console at the same time as a Job is running, you
104    will need to set this value greater than 1.  To run simultaneous Jobs,
105    you will need to set a number of other directives in the Director's
106    configuration file.  Which ones you set depend on what you want, but you
107    will almost certainly need to set the {\bf Maximum Concurrent Jobs} in
108    the Storage resource in the Director's configuration file and possibly
109    those in the Job and Client resources.
110
111 \item [SDAddresses = \lt{}IP-address-specification\gt{}]
112    \index[sd]{SDAddresses}
113    Specify the ports and addresses on which the Storage daemon will listen
114    for Director connections.  Normally, the default is sufficient and you
115    do not need to specify this directive.  Probably the simplest way to
116    explain how this directive works is to show an example:
117
118 \footnotesize
119 \begin{verbatim}
120  SDAddresses  = { ip = {
121         addr = 1.2.3.4; port = 1205; }
122     ipv4 = {
123         addr = 1.2.3.4; port = http; }
124     ipv6 = {
125         addr = 1.2.3.4;
126         port = 1205;
127     }
128     ip = {
129         addr = 1.2.3.4
130         port = 1205
131     }
132     ip = {
133         addr = 1.2.3.4
134     }
135     ip = {
136         addr = 201:220:222::2
137     }
138     ip = {
139         addr = bluedot.thun.net
140     }
141 }
142 \end{verbatim}
143 \normalsize
144
145 where ip, ip4, ip6, addr, and port are all keywords. Note, that  the address
146 can be specified as either a dotted quadruple, or  IPv6 colon notation, or as
147 a symbolic name (only in the ip specification).  Also, port can be specified
148 as a number or as the mnemonic value from  the /etc/services file.  If a port
149 is not specified, the default will be used. If an ip  section is specified,
150 the resolution can be made either by IPv4 or  IPv6. If ip4 is specified, then
151 only IPv4 resolutions will be permitted,  and likewise with ip6.  
152
153 Using this directive, you can replace both the SDPort and SDAddress 
154 directives shown below. 
155
156 \item [SDPort = \lt{}port-number\gt{}]
157    \index[sd]{SDPort }
158    Specifies port number on which the Storage daemon  listens for Director
159    connections. The default is 9103.  
160    
161 \item [SDAddress = \lt{}IP-Address\gt{}]
162    \index[sd]{SDAddress }
163    This directive is optional,  and if it is specified, it will cause the Storage
164    daemon server (for  Director and File daemon connections) to bind to the
165    specified  {\bf IP-Address}, which is either a domain name or an IP address 
166    specified as a dotted quadruple. If this directive is not specified,  the
167    Storage daemon will bind to any available address (the default).
168
169 \end{description}
170
171 The following is a typical Storage daemon Storage definition. 
172
173 \footnotesize
174 \begin{verbatim}
175 #
176 # "Global" Storage daemon configuration specifications appear
177 # under the Storage resource.
178 #
179 Storage {
180   Name = "Storage daemon"
181   Address = localhost
182   WorkingDirectory = "~/bacula/working"
183   Pid    Directory = "~/bacula/working"
184 }
185 \end{verbatim}
186 \normalsize
187
188 \subsection*{Director Resource}
189 \label{DirectorResource1}
190 \index[general]{Director Resource}
191 \index[general]{Resource!Director}
192 \addcontentsline{toc}{subsection}{Director Resource}
193
194 The Director resource specifies the Name of the Director which is permitted
195 to use the services of the Storage daemon.  There may be multiple Director
196 resources.  The Director Name and Password must match the corresponding
197 values in the Director's configuration file.
198
199 \begin{description}
200
201 \item [Name = \lt{}Director-Name\gt{}]
202    \index[sd]{Name }
203    Specifies the Name of the Director allowed to connect  to the Storage daemon.
204    This directive is required.  
205
206 \item [Password = \lt{}Director-password\gt{}]
207    \index[sd]{Password }
208    Specifies the password that must be supplied by the above named  Director.
209    This directive is required.  
210
211 \item [Monitor = \lt{}yes|no\gt{}]
212    \index[sd]{Monitor }
213    If Monitor is set to {\bf no} (default), this director will have full
214    access to this Storage daemon.  If Monitor is set to {\bf yes}, this
215    director will only be able to fetch the current status of this Storage
216    daemon.
217
218    Please note that if this director is being used by a Monitor, we highly 
219    recommend to set this directive to {\bf yes} to avoid serious security 
220    problems. 
221
222 \end{description}
223
224 The following is an example of a valid Director resource definition: 
225
226 \footnotesize
227 \begin{verbatim}
228 Director {
229   Name = MainDirector
230   Password = my_secret_password
231 }
232 \end{verbatim}
233 \normalsize
234
235 \label{DeviceResource}
236 \subsection*{Device Resource}
237 \index[general]{Resource!Device}
238 \index[general]{Device Resource}
239 \addcontentsline{toc}{subsection}{Device Resource}
240
241 The Device Resource specifies the details of each device (normally a tape
242 drive) that can be used by the Storage daemon.  There may be multiple
243 Device resources for a single Storage daemon.  In general, the properties
244 specified within the Device resource are specific to the Device.
245
246 \begin{description}
247
248 \item [Name = {\it Device-Name}]
249    \index[sd]{Name }
250    Specifies the Name that the Director will use when asking to backup or
251    restore to or from to this device. This is the logical  Device name, and may
252    be any string up to 127 characters in length.  It is generally a good idea to
253    make it correspond to the English  name of the backup device. The physical
254    name of the device is  specified on the {\bf Archive Device} directive
255    described below.  The name you specify here is also used in your Director's
256    conf  file on the 
257    \ilink{Device directive}{StorageResource2}  in its Storage
258    resource. 
259
260 \item [Archive Device = {\it name-string}]
261    \index[sd]{Archive Device }
262    The specified {\bf name-string} gives the system file name of the  storage
263    device managed by this storage daemon. This will usually be  the device file
264    name of a removable storage device (tape drive),  for example "{\bf
265    /dev/nst0}" or "{\bf /dev/rmt/0mbn}".  For a DVD-writer, it will be for
266    example {\bf /dev/hdc}.  It may also be a directory name if you are archiving
267    to disk storage.  In this case, you must supply the full absolute path to the
268    directory.  When specifying a tape device, it is preferable that the 
269    "non-rewind" variant of the device file name be given.  In addition, on
270    systems such as Sun, which have multiple tape  access methods, you must be
271    sure to specify to use  Berkeley I/O conventions with the device. The {\bf b}
272    in the Solaris (Sun)  archive specification {\bf /dev/rmt/0mbn} is what is
273    needed in  this case. Bacula does not support SysV tape drive behavior.  
274    
275    As noted above, normally the Archive Device is the name of a  tape drive, but
276    you may also specify an absolute path to  an existing directory. If the Device
277    is a directory  Bacula will write to file storage in the specified directory,
278    and  the filename used will be the Volume name as specified in the  Catalog.
279    If you want to write into more than one directory (i.e.  to spread the load to
280    different disk drives), you will need to define  two Device resources, each
281    containing an Archive Device with a  different directory.  
282    
283    In addition to a tape device name or a directory name, Bacula will  accept the
284    name of a FIFO. A FIFO is a special kind of file that  connects two programs
285    via kernel memory. If a FIFO device is specified  for a backup operation, you
286    must have a program that reads what Bacula  writes into the FIFO. When the
287    Storage daemon starts the job, it  will wait for {\bf MaximumOpenWait} seconds
288    for the read program to start reading, and then time it out and  terminate
289    the job. As a consequence, it is best to start the read  program at the
290    beginning of the job perhaps with the {\bf RunBeforeJob}  directive. For this
291    kind of device, you never want to specify  {\bf AlwaysOpen}, because you want
292    the Storage daemon to open it only  when a job starts, so you must explicitly
293    set it to {\bf No}.  Since a FIFO is a one way device, Bacula will not attempt
294    to read  a label of a FIFO device, but will simply write on it. To create a 
295    FIFO Volume in the catalog, use the {\bf add} command rather than  then {\bf
296    label} command to avoid attempting to write a label.  
297    
298    During a restore operation, if the Archive Device is a FIFO, Bacula  will
299    attempt to read from the FIFO, so you must have an external program  that
300    writes into the FIFO. Bacula will wait {\bf MaximumOpenWait} seconds  for the
301    program to begin writing and will then time it out and  terminate the job. As
302    noted above, you may use the {\bf RunBeforeJob}  to start the writer program
303    at the beginning of the job.  
304    
305    The Archive Device directive is required. 
306
307 \item [Device Type = {\it type-specification}]
308    \index[sd]{Device Type}
309    The Device Type specification allows you to explicitly tell Bacula
310    what kind of device you are defining. It the {\it type-specification}
311    may be one of the following:
312    \begin{description}
313    \item [File]
314      Tells Bacula that the device is a file. It may either be a
315      file defined on fixed medium or a removable filesystem such as
316      USB.  All files must be random access devices.
317    \item [Tape]
318      The device is a tape device and thus is sequential access. Tape devices
319      are controlled using ioctl() calls.
320    \item [Fifo]
321      The device is a first-in-first out sequential access read-only 
322      or write-only device.
323    \item [DVD]
324      The device is a DVD. DVDs are sequential access for writing, but
325      random access for reading.
326   \end{description}
327   
328   The Device Type directive is not required, and if not specified, Bacula
329   will attempt to guess what kind of device has been specified using the
330   Archive Device specification supplied. There are several advantages to
331   explicitly specifying the Device Type. First, on some systems, block and
332   character devices have the same type, which means that on those systems,
333   Bacula is unlikely to be able to correctly guess that a device is a DVD.
334   Secondly, if you explicitly specify the Device Type, the mount point
335   need not be defined until the device is opened. This is the case with
336   most removable devices such as USB that are mounted by the HAL daemon.
337   If the Device Type is not explicitly specified, then the mount point
338   must exist when the Storage daemon starts.
339
340   This directive was implemented in Bacula version 1.39.5.
341
342
343 \item [Media Type = {\it name-string}]
344    \index[sd]{Media Type }
345    The specified {\bf name-string} names the type of media supported by this
346    device, for example, "DLT7000".  Media type names are arbitrary in that you
347    set them to anything you want, but they must be known to the volume
348    database to keep track of which storage daemons can read which volumes.  In
349    general, each different storage type should have a unique Media Type
350    associated with it.  The same {\bf name-string} must appear in the
351    appropriate Storage resource definition in the Director's configuration
352    file.
353    
354    Even though the names you assign are arbitrary (i.e.  you choose the name
355    you want), you should take care in specifying them because the Media Type
356    is used to determine which storage device Bacula will select during
357    restore.  Thus you should probably use the same Media Type specification
358    for all drives where the Media can be freely interchanged.  This is not
359    generally an issue if you have a single Storage daemon, but it is with
360    multiple Storage daemons, especially if they have incompatible media.
361    
362    For example, if you specify a Media Type of "DDS-4" then during the
363    restore, Bacula will be able to choose any Storage Daemon that handles
364    "DDS-4".  If you have an autochanger, you might want to name the Media Type
365    in a way that is unique to the autochanger, unless you wish to possibly use
366    the Volumes in other drives.  You should also ensure to have unique Media
367    Type names if the Media is not compatible between drives.  This
368    specification is required for all devices.
369
370    In addition, if you are using disk storage, each Device resource will
371    generally have a different mount point or directory. In order for
372    Bacula to select the correct Device resource, each one must have a
373    unique Media Type.
374
375 \label{Autochanger}
376 \item [Autochanger = {\it Yes|No}]
377    \index[sd]{Autochanger}
378    If {\bf Yes}, this device belongs to an automatic tape changer, and  you should also
379    specify a {\bf Changer Device} as well as  a {\bf Changer Command}.  If {\bf
380    No} (default), the volume must be manually changed.  You should also
381    have an identical directive to the  
382    \ilink{Storage resource}{Autochanger1}  in the Director's
383    configuration file so that  when labeling tapes you are prompted for the slot.
384
385 \item [Changer Device = {\it name-string}]
386    \index[sd]{Changer Device }
387    The specified {\bf name-string} must be the {\bf generic SCSI} device
388    name of the autochanger that corresponds to the normal read/write
389    {\bf Archive Device}  specified in the Device resource. This
390    gemeric SCSI device name should be specified if you have an autochanger 
391    or if you have a standard tape drive and want to use the
392    {\bf Alert Command} (see below). For example, on Linux systems, for 
393    an Archive Device name of {\bf /dev/nst0}, you would specify {\bf
394    /dev/sg0} for the Changer Device name. Depending on your exact
395    configuration, and the number of autochangers or the type of
396    autochanger, what you specify here can vary.  This directive is
397    optional.  See the \ilink{ Using Autochangers}{_ChapterStart18} chapter
398    of this manual for more details of using this and the following
399    autochanger directives.
400
401 \item [Changer Command = {\it name-string}]
402    \index[sd]{Changer Command }
403    The {\bf name-string} specifies an external program to be called  that will
404    automatically change volumes as required by {\bf Bacula}.  Most frequently,
405    you will specify the Bacula supplied {\bf mtx-changer}  script as follows:  
406
407 \footnotesize
408 \begin{verbatim}
409 Changer Command = "/path/mtx-changer %c %o %S %a %d"
410 \end{verbatim}
411 \normalsize
412
413    and you will install the {\bf mtx} on your system (found  in the {\bf depkgs}
414    release). An example of this command is in the default bacula-sd.conf file. 
415    For more details on the substitution characters that may be specified  to
416    configure your autochanger please see  the 
417    \ilink{Autochangers}{_ChapterStart18} chapter of this  manual.
418    For FreeBSD users, you might want to see one of the  several {\bf chio}
419    scripts in {\bf examples/autochangers}.  
420
421 \item [Alert Command = {\it name-string}]
422    \index[sd]{Alert Command }
423    The {\bf name-string} specifies an external program to be called  at the
424    completion of each Job after the device is released.  The purpose of this
425    command is to check for Tape Alerts, which  are present when something is
426    wrong with your tape drive  (at least for most modern tape drives).  The same
427    substitution characters that may be specified  in the Changer Command may also
428    be used in this string.  For more information, please see  the 
429    \ilink{Autochangers}{_ChapterStart18} chapter of this  manual. 
430    
431    
432    Note, it is not necessary to have an autochanger to use this  command. The
433    example below uses the {\bf tapeinfo} program  that comes with the {\bf mtx}
434    package, but it can be used  on any tape drive. However, you will need to
435    specify  a {\bf Changer Device} directive in your Device resource  (see above)
436    so that the generic SCSI device name can be  edited into the command (with the
437    \%c).  
438    
439    An example of the use of this command to print Tape Alerts  in the Job report
440    is:  
441
442 \footnotesize
443 \begin{verbatim}
444 Alert Command = "sh -c 'tapeinfo -f %c | grep TapeAlert'"
445       
446 \end{verbatim}
447 \normalsize
448
449 and an example output when there is a problem could be:  
450
451 \footnotesize
452 \begin{verbatim}
453 bacula-sd  Alert: TapeAlert[32]: Interface: Problem with SCSI interface
454                   between tape drive and initiator.
455       
456 \end{verbatim}
457 \normalsize
458
459 \item [Drive Index = {\it number}]
460    \index[sd]{Drive Index}
461    The {\bf Drive Index} that you specify is passed to the  {\bf mtx-changer}
462    script and is thus passed to the {\bf mtx}  program. By default, the Drive
463    Index is zero, so if you have only  one drive in your autochanger, everything
464    will work normally.  However, if you have multiple drives, you may specify two
465    Bacula  Device resources. The first will either set Drive Index to zero,  or
466    leave it unspecified, and the second Device Resource should  contain a Drive
467    Index set to 1. This will then permit you to  use two or more drives in your
468    autochanger. However, you must ensure  that Bacula does not request the same
469    Volume on both drives  at the same time. You may also need to modify the
470    mtx-changer  script to do locking so that two jobs don't attempt to use  the
471    autochanger at the same time. An example script can  be found in {\bf
472    examples/autochangers/locking-mtx-changer}.
473
474 \item [Autoselect = {\it Yes|No}]
475    \index[sd]{Autoselect}
476    If this directive is set to {\bf yes} (default), and the Device
477    belongs to an autochanger, then when the Autochanger is referenced
478    by the Director, this device can automatically be selected. If this
479    directive is set to {\bf no}, then the Device can only be referenced
480    by directly using the Device name in the Director. This is useful
481    for reserving a drive for something special such as a high priority
482    backup or restore operations.
483
484 \item [Maximum Changer Wait = {\it seconds}]
485    \index[sd]{Maximum Changer Wait}
486    This directive specifies the maximum time in seconds for Bacula to wait
487    for an autochanger to change the volume.  If this time is exceeded,
488    Bacula will invalidate the Volume slot number stored in the catalog and
489    try again.  If no additional changer volumes exist, Bacula will ask the
490    operator to intervene.  The default is 5 minutes.      
491
492    Please note that if you want to set your changer wait time to
493    10 minutes, you must specify:
494
495 \begin{verbatim}
496 Maximum Changer Wait = 600
497 \end{verbatim}
498
499    This directive will not accept qualifiers (such as "minutes").
500
501 \item [Maximum Rewind Wait = {\it seconds}]
502    \index[sd]{Maximum Rewind Wait}
503    This directive specifies the maximum time in seconds for Bacula to wait
504    for a rewind before timing out.  If this time is exceeded,
505    Bacula will cancel the job.  The default is 5 minutes.
506
507 \item [Maximum Open Wait = {\it seconds}]
508    \index[sd]{Maximum Open Wait}
509    This directive specifies the maximum time in seconds for Bacula to wait
510    for a open before timing out.  If this time is exceeded,
511    Bacula will cancel the job.  The default is 5 minutes.
512
513 \item [Always Open = {\it Yes|No}]
514    \index[sd]{Always Open }
515    If {\bf Yes} (default), Bacula will always keep the device open unless
516    specifically {\bf unmounted} by the Console program.  This permits
517    Bacula to ensure that the tape drive is always available.  If you set
518    {\bf AlwaysOpen} to {\bf no} {\bf Bacula} will only open the drive when
519    necessary, and at the end of the Job if no other Jobs are using the
520    drive, it will be freed.  The next time Bacula wants to append to a tape
521    on a drive that was freed, Bacula must rewind the tape and position to
522    the end.  To avoid unnecessary tape positioning and to minimize
523    unnecessary operator intervention, it is highly recommended that {\bf
524    Always Open = yes}.  This also ensures that the drive is available when
525    Bacula needs it.
526    
527    If you have {\bf Always Open = yes} (recommended) and you want  to use the
528    drive for something else, simply use the {\bf unmount}  command in the Console
529    program to release the drive. However, don't  forget to remount the drive with
530    {\bf mount} when the drive is  available or the next Bacula job will block.  
531    
532    For File storage, this directive is ignored. For a FIFO storage  device, you
533    must set this to {\bf No}.  
534    
535    Please note that if you set this directive to {\bf No} Bacula  will release
536    the tape drive between each job, and thus the next job  will rewind the tape
537    and position it to the end of the data. This  can be a very time consuming
538    operation. 
539
540 \item [Volume Poll Interval = {\it time}]
541    \index[sd]{Volume Poll Interval }
542    If the time  specified on this directive is non-zero, after  asking the
543    operator to mount a new volume Bacula will  periodically poll (or read) the
544    drive at the specified  interval to see if a new volume has been mounted. If
545    the  time interval is zero (the default), no polling will occur.  This
546    directive can be useful if you want to avoid operator  intervention via the
547    console. Instead, the operator can  simply remove the old volume and insert
548    the requested one,  and Bacula on the next poll will recognize the new tape
549    and  continue. Please be aware that if you set this interval  too small, you
550    may excessively wear your tape drive if the  old tape remains in the drive,
551    since Bacula will read it on  each poll. This can be avoided by ejecting the
552    tape using  the {\bf Offline On Unmount} and the {\bf Close on Poll} 
553    directives. 
554    However, if you are using a Linux 2.6 kernel or other OSes
555    such as FreeBSD or Solaris, the Offline On Unmount will leave the drive
556    with no tape, and Bacula will not be able to properly open the drive and
557    may fail the job.  For more information on this problem, please see the
558    \ilink{description of Offline On Unmount}{NoTapeInDrive} in the Tape
559    Testing chapter.
560
561 \item [Close on Poll= {\it Yes|No}]
562    \index[sd]{Close on Poll}
563    If {\bf Yes}, Bacula close the device (equivalent to  an unmount except no
564    mount is required) and reopen it at each  poll. Normally this is not too
565    useful unless you have the  {\bf Offline on Unmount} directive set, in which
566    case the  drive will be taken offline preventing wear on the tape  during any
567    future polling. Once the operator inserts a new  tape, Bacula will recognize
568    the drive on the next poll and  automatically continue with the backup. 
569    Please see above more more details.
570
571 \item [Maximum Open Wait = {\it seconds}]
572    \index[sd]{Maximum Open Wait }
573    This directive specifies the maximum amount of time in seconds that
574    Bacula will wait for a device that is busy.  The default is 5 minutes.
575    If the device cannot be obtained, the current Job will be terminated in
576    error.  Bacula will re-attempt to open the drive the next time a Job
577    starts that needs the the drive.
578
579 \item [Removable media = {\it Yes|No}]
580    \index[sd]{Removable media }
581    If {\bf Yes}, this device supports removable media (for  example, tapes or
582    CDs). If {\bf No}, media cannot be removed  (for example, an intermediate
583    backup area on a hard disk).  
584
585 \item [Random access = {\it Yes|No}]
586    \index[sd]{Random access }
587    If {\bf Yes}, the archive device is assumed to be a random  access medium
588    which supports the {\bf lseek} (or  {\bf lseek64} if Largefile is enabled
589    during configuration) facility.  
590
591 \item [Minimum block size = {\it size-in-bytes}]
592    \index[sd]{Minimum block size }
593    On most modern tape drives, you will not need or wamt to specify this
594    directive, and if you do so, it will be to make Bacula use fixed block
595    sizes.  This statement applies only to non-random access devices (e.g.
596    tape drives).  Blocks written by the storage daemon to a non-random
597    archive device will never be smaller than the given {\bf size-in-bytes}.
598    The Storage daemon will attempt to efficiently fill blocks with data
599    received from active sessions but will, if necessary, add padding to a
600    block to achieve the required minimum size.
601    
602    To force the block size to be fixed, as is the case for some non-random
603    access devices (tape drives), set the {\bf Minimum block size} and the
604    {\bf Maximum block size} to the same value (zero included).  The default
605    is that both the minimum and maximum block size are zero and the default
606    block size is 64,512 bytes.  If you wish the block size to be fixed and
607    different from the default, specify the same value for both {\bf Minimum
608    block size} and {\bf Maximum block size}.
609    
610    For  example, suppose you want a fixed block size of 100K bytes, then you 
611    would specify:  
612
613 \footnotesize
614 \begin{verbatim}
615  
616     Minimum block size = 100K
617     Maximum block size = 100K
618     
619 \end{verbatim}
620 \normalsize
621
622    Please note that if you specify a fixed block size as shown above,  the tape
623    drive must either be in variable block size mode, or  if it is in fixed block
624    size mode, the block size (generally  defined by {\bf mt}) {\bf must} be
625    identical to the size specified  in Bacula -- otherwise when you attempt to
626    re-read your Volumes,  you will get an error.  
627    
628    If you want the  block size to be variable but with a 64K minimum and 200K
629    maximum (and  default as well), you would specify:  
630
631 \footnotesize
632 \begin{verbatim}
633  
634     Minimum block size = 64K
635     Maximum blocksize = 200K
636    
637 \end{verbatim}
638 \normalsize
639
640 \item [Maximum block size = {\it size-in-bytes}]
641    \index[sd]{Maximum block size }
642    On most modern tape drives, you will not need to specify this directive.
643    If you do so, it will most likely be to use fixed block sizes (see
644    Minimum block size above).  The Storage daemon will aways attempt to
645    write blocks of the specified {\bf size-in-bytes} to the archive device.
646    As a consequence, this statement specifies both the default block size
647    and the maximum block size.  The size written never exceed the given
648    {\bf size-in-bytes}.  If adding data to a block would cause it to exceed
649    the given maximum size, the block will be written to the archive device,
650    and the new data will begin a new block.
651    
652    If no value is specified or zero is specified, the Storage daemon will
653    use a default block size of 64,512 bytes (126 * 512).
654
655 \item [Hardware End of Medium = {\it Yes|No}]
656    \index[sd]{Hardware End of Medium }
657    If {\bf No}, the archive device is not required to support end  of medium
658    ioctl request, and the storage daemon will use the forward  space file
659    function to find the end of the recorded data. If  {\bf Yes}, the archive
660    device must support the {\tt ioctl}  {\tt MTEOM} call, which will position the
661    tape to the end of the  recorded data. In addition, your SCSI driver must keep
662    track  of the file number on the tape and report it back correctly by  the
663    {\bf MTIOCGET} ioctl. Note, some SCSI drivers will correctly  forward space to
664    the end of the recorded data, but they do not  keep track of the file number.
665    On Linux machines, the SCSI driver  has a {\bf fast-eod} option, which if set
666    will cause the driver  to lose track of the file number. You should ensure
667    that this  option is always turned off using the {\bf mt} program.  
668    
669    Default setting for Hardware End of Medium is {\bf Yes}. This  function is
670    used before appending to a tape to ensure that no  previously written data is
671    lost. We recommend if you have a non-standard or unusual tape drive that you
672    use the {\bf btape} program  to test your drive to see whether or not it
673    supports this function.  All modern (after 1998) tape drives support this
674    feature.  
675    
676 \item [Fast Forward Space File = {\it Yes|No}]
677    \index[sd]{Fast Forward Space File }
678    If {\bf No}, the archive device is not required to support  keeping track of
679    the file number ({\bf MTIOCGET} ioctl) during  forward space file. If {\bf
680    Yes}, the archive device must support  the {\tt ioctl} {\tt MTFSF} call, which
681    virtually all drivers  support, but in addition, your SCSI driver must keep
682    track of the  file number on the tape and report it back correctly by the 
683    {\bf MTIOCGET} ioctl. Note, some SCSI drivers will correctly  forward space,
684    but they do not keep track of the file number or more  seriously, they do not
685    report end of meduim.  
686    
687    Default setting for Fast Forward Space File is {\bf Yes}.
688    
689 \item [Use MTIOCGET = {\it Yes|No}]
690    \index[sd]{Fast Forward Space File }
691    If {\bf No}, the operating system is not required to support keeping track of
692    the file number and reporting it in the ({\bf MTIOCGET} ioctl). The default
693    is {\bf Yes}. If you must set this to No, Bacula will do the proper file
694    position determination, but it is very unfortunate because it means that 
695    tape movement is very inefficient.
696    Fortunately, this operation system deficiency seems to be the case only
697    on a few *BSD systems.  Operating systems known to work correctly are
698    Solaris, Linux and FreeBSD.
699
700 \item [BSF at EOM = {\it Yes|No}]
701    \index[sd]{BSF at EOM }
702    If {\bf No}, the default, no special action is taken by  Bacula with the End
703    of Medium (end of tape) is reached because  the tape will be positioned after
704    the last EOF tape mark, and  Bacula can append to the tape as desired.
705    However, on some  systems, such as FreeBSD, when Bacula reads the End of
706    Medium  (end of tape), the tape will be positioned after the second  EOF tape
707    mark (two successive EOF marks indicated End of  Medium). If Bacula appends
708    from that point, all the appended  data will be lost. The solution for such
709    systems is to  specify {\bf BSF at EOM} which causes Bacula to backspace  over
710    the second EOF mark. Determination of whether or not  you need this directive
711    is done using the {\bf test} command  in the {\bf btape} program.
712
713 \item [TWO EOF = {\it Yes|No}]
714    \index[sd]{TWO EOF }
715    If {\bf Yes}, Bacula will write two end of file marks when  terminating a tape
716 -- i.e. after the last job or at the end of  the medium. If {\bf No}, the
717 default, Bacula will only write  one end of file to terminate the tape. 
718
719 \item [Backward Space Record = {\it Yes|No}]
720    \index[sd]{Backward Space Record}
721    If {\it Yes}, the archive device supports the {\tt MTBSR  ioctl} to backspace
722    records. If {\it No}, this call is not  used and the device must be rewound
723    and advanced forward to the  desired position. Default is {\bf Yes} for non
724    random-access  devices. This function if enabled is used at the end of a 
725    Volume after writing the end of file and any ANSI/IBM labels to determine whether
726    or not the last block was written correctly. If you turn this function off,
727    the test will not be done. This causes no harm as the re-read process is
728    precautionary rather than required.
729
730 \item [Backward Space File = {\it Yes|No}]
731    \index[sd]{Backward Space File }
732    If {\it Yes}, the archive device supports the {\bf MTBSF} and  {\bf MTBSF
733   ioctl}s to backspace over an end of file mark and to the  start of a file. If
734   {\it No}, these calls are not used and the  device must be rewound and
735   advanced forward to the desired position.  Default is {\bf Yes} for non
736   random-access devices. 
737
738 \item [Forward Space Record = {\it Yes|No}]
739    \index[sd]{Forward Space Record }
740    If {\it Yes}, the archive device must support the {\bf MTFSR  ioctl} to
741    forward space over records. If {\bf No}, data must  be read in order to
742    advance the position on the device. Default is  {\bf Yes} for non
743    random-access devices. 
744
745 \item [Forward Space File = {\it Yes|No}]
746    \index[sd]{Forward Space File }
747    If {\bf Yes}, the archive device must support the {\tt MTFSF  ioctl} to
748    forward space by file marks. If {\it No}, data  must be read to advance the
749    position on the device. Default is  {\bf Yes} for non random-access devices. 
750
751 \item [Offline On Unmount = {\it Yes|No}]
752    \index[sd]{Offline On Unmount }
753    The default for this directive is {\bf No}. If {\bf Yes} the  archive device
754    must support the {\tt MTOFFL ioctl} to rewind and  take the volume offline. In
755    this case, Bacula will issue the  offline (eject) request before closing the
756    device during the {\bf unmount}  command. If {\bf No} Bacula will not attempt
757    to offline the  device before unmounting it. After an offline is issued,  the
758    cassette will be ejected thus {\bf requiring operator intervention}  to
759    continue, and on some systems require an explicit load command  to be issued
760    ({\bf mt -f /dev/xxx load}) before the system will recognize  the tape. If you
761    are using an autochanger, some devices  require an offline to be issued prior
762    to changing the volume. However,  most devices do not and may get very
763    confused.  
764
765    If you are using a Linux 2.6 kernel or other OSes
766    such as FreeBSD or Solaris, the Offline On Unmount will leave the drive
767    with no tape, and Bacula will not be able to properly open the drive and
768    may fail the job.  For more information on this problem, please see the
769    \ilink{description of Offline On Unmount}{NoTapeInDrive} in the Tape
770    Testing chapter.
771
772
773 \item [Maximum Volume Size = {\it size}]
774    \index[sd]{Maximum Volume Size }
775    No more than {\bf size} bytes will be written onto a given volume on the
776    archive device.  This directive is used mainly in testing Bacula to
777    simulate a small Volume.  It can also be useful if you wish to limit the
778    size of a File Volume to say less than 2GB of data.  In some rare cases
779    of really antiquated tape drives that do not properly indicate when the
780    end of a tape is reached during writing (though I have read about such
781    drives, I have never personally encountered one).  Please note, this
782    directive is deprecated (being phased out) in favor of the {\bf Maximum
783    Volume Bytes} defined in the Director's configuration file.
784
785 \item [Maximum File Size = {\it size}]
786    \index[sd]{Maximum File Size }
787    No more than {\bf size} bytes will be written into a given logical file
788    on the volume.  Once this size is reached, an end of file mark is
789    written on the volume and subsequent data are written into the next
790    file.  Breaking long sequences of data blocks with file marks permits
791    quicker positioning to the start of a given stream of data and can
792    improve recovery from read errors on the volume.  The default is one
793    Gigabyte.
794
795 \item [Block Positioning = {\it yes|no}]
796    \index[sd]{Block Positioning }
797    This directive is not normally used (and has not yet been  tested). It will
798    tell Bacula not to use block positioning when  it is reading tapes. This can
799    cause Bacula to be {\bf extremely}  slow when restoring files. You might use
800    this directive if you  wrote your tapes with Bacula in variable block mode
801    (the default),  but your drive was in fixed block mode. If it then works as  I
802    hope, Bacula will be able to re-read your tapes. 
803
804 \item [Maximum Network Buffer Size = {\it bytes}]
805    \index[sd]{Maximum Network Buffer Size }
806    where {\it bytes} specifies the initial network buffer  size to use with the
807    File daemon.  This size will be adjusted down if it is too large until
808    it is accepted by the OS. Please use care in setting this value since if
809    it is too large, it will be trimmed by 512 bytes until the OS is happy,
810    which may require a large number of system calls.  The default value is
811    32,768 bytes.
812
813    The default size was chosen to be relatively large but not too big in
814    the case that you are transmitting data over Internet.  It is clear that
815    on a high speed local network, you can increase this number and improve
816    performance. For example, some users have found that if you use a value
817    of 65,536 bytes they get 5-10 times the throughput.  Larger values for
818    most users don't seem to improve performance. If you are interested
819    in improving your backup speeds, this is definitely a place to
820    experiment. You will probably also want to make the corresponding change
821    in each of your File daemons conf files.
822
823
824 \item [Maximum Spool Size = {\it bytes}]
825    \index[sd]{Maximum Spool Size }
826    where the bytes specify the maximum spool size for all jobs  that are running.
827    The default is no limit. 
828
829 \item [Maximum Job Spool Size = {\it bytes}]
830    \index[sd]{Maximum Job Spool Size }
831    where the bytes specify the maximum spool size for any one job  that is
832    running. The default is no limit. 
833    This directive is implemented only in version 1.37 and later.
834
835 \item [Spool Directory = {\it directory}]
836    \index[sd]{Spool Directory }
837    specifies the name of the directory to be used to store  the spool files for
838    this device. This directory is also used to store  temporary part files when
839    writing to a device that requires mount (DVD).  The default is to use the
840    working directory. 
841
842 \item [Maximum Part Size = {\it bytes}]
843    \index[sd]{Maximum Part Size }
844    This is the maximum size of a volume part file. The default is no limit.
845    This directive is implemented only in version 1.37 and later.
846
847    If the device requires  mount, it is transfered to the device when this size
848    is reached.  In this case, you must take care to have enough disk space left
849    in  the spool directory.  
850
851    Otherwise, it is left on the hard disk.  
852
853    It is ignored for tape and FIFO devices.  
854
855
856 \end{description}
857
858 \subsection*{Devices that require a mount (DVD)}
859 \index[general]{Devices that require a mount (DVD)}
860 \index[general]{DVD!Devices that require a mount}
861 \addcontentsline{toc}{subsection}{Devices that require a mount (DVD)}
862
863 All the directives in this section are implemented only in
864 Bacula version 1.37 and later.  As of version 1.39.5, the directives
865 "Requires Mount", "Mount Point", "Mount Command", and "Unmount Command"
866 apply to removable filesystems such as USB in addition to DVD.
867
868 \begin{description}
869
870 \item [Requires Mount = {\it Yes|No}]
871    \index[sd]{Requires Mount }
872    You must set this directive to {\bf yes} for DVD-writers,  and to {\bf no} for
873    all other devices (tapes/files).  This directive indicates if the device
874    requires to be mounted to be read,  and if it must be written in a special way.
875    If it set, {\bf Mount Point},  {\bf Mount Command}, {\bf Unmount Command} and
876    {\bf Write Part Command}  directives must also be defined. 
877
878 \item [Mount Point = {\it directory}]
879    \index[sd]{Mount Point }
880    Directory where the device can be mounted. 
881
882 \item [Mount Command = {\it name-string}]
883    \index[sd]{Mount Command }
884    Command that must be executed to mount the device. Before the command is 
885    executed, \%a is replaced with the Archive Device, and \%m with the Mount 
886    Point.
887
888    Most frequently, you will define it as follows:  
889
890 \footnotesize
891 \begin{verbatim}
892   Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
893 \end{verbatim}
894 \normalsize
895
896 \item [Unmount Command = {\it name-string}]
897    \index[sd]{Unmount Command }
898    Command that must be executed to unmount the device. Before the command  is
899    executed, \%a is replaced with the Archive Device, and \%m with the  Mount
900    Point.
901
902    Most frequently, you will define it as follows:  
903
904 \footnotesize
905 \begin{verbatim}
906   Unmount Command = "/bin/umount %m"
907 \end{verbatim}
908 \normalsize
909
910 \item [Write Part Command = {\it name-string}]
911    \index[sd]{Write Part Command }
912    Command that must be executed to write a part to the device. Before the 
913    command is executed, \%a is replaced with the Archive Device, \%m with the 
914    Mount Point, \%e is replaced with 1 if we are writing the first part,
915    and with 0 otherwise, and \%v with the current part filename.
916
917    For a DVD, you will most frequently specify the Bacula supplied  {\bf
918    dvd-writepart} script as follows:  
919
920 \footnotesize
921 \begin{verbatim}
922   Write Part Command = "/path/dvd-writepart %e %a %v"
923 \end{verbatim}
924 \normalsize
925
926   Where {\bf /path} is the path to your scripts install directory, and
927   dvd-writepart is the Bacula supplied script file.  
928   This command will already be present, but commented out,
929   in the default bacula-sd.conf file. To use it, simply remove
930   the comment (\#) symbol.
931
932
933 \item [Free Space Command = {\it name-string}]
934    \index[sd]{Free Space Command }
935    Command that must be executed to check how much free space is left on the 
936    device. Before the command is executed,\%a is replaced with the Archive
937    Device, \%m with the Mount Point, \%e is replaced with 1 if we are writing
938    the first part, and with 0 otherwise, and \%v with the current part filename.
939
940    For a DVD, you will most frequently specify the Bacula supplied  {\bf
941    dvd-freespace} script as follows:  
942
943 \footnotesize
944 \begin{verbatim}
945   Free Space Command = "/path/dvd-freespace %a"
946 \end{verbatim}
947 \normalsize
948
949   Where {\bf /path} is the path to your scripts install directory, and
950   dvd-freespace is the Bacula supplied script file.
951   If you want to specify your own command, please look at the code of
952   dvd-freespace to see what output Bacula expects from this command.
953   This command will already be present, but commented out,
954   in the default bacula-sd.conf file. To use it, simply remove
955   the comment (\#) symbol.
956
957   If you do not set it, Bacula will expect there is always free space on the
958   device. 
959
960 \end{description}
961
962 \label{AutochangerRes}
963 \label{AutochangerResource1}
964 \input{autochangerres}
965
966 \subsection*{Capabilities}
967 \index[general]{Capabilities}
968 \addcontentsline{toc}{subsection}{Capabilities}
969
970 \begin{description}
971
972 \item [Label media = {\it Yes|No}]
973    \index[sd]{Label media }
974    If {\bf Yes}, permits this device to automatically  label blank media without
975    an explicit operator command.  It does so by using an internal algorithm as
976    defined  on the 
977    \ilink{Label Format}{Label} record in each Pool resource.  If
978    this is {\bf No} as by default,  Bacula will label tapes only by specific
979    operator  command ({\bf label} in the Console) or when the tape has been
980    recycled.  The automatic labeling feature is most useful when writing to disk 
981    rather than tape volumes.  
982
983 \item [Automatic mount = {\it Yes|No}]
984    \index[sd]{Automatic mount }
985    If {\bf Yes} (the default), permits the daemon to examine the device to
986    determine if it contains a Bacula labeled volume.  This is done
987    initially when the daemon is started, and then at the beginning of each
988    job.  If the This directive is particularly important if you have set
989    {\bf Always Open = no} because it permits Bacula to attempt to read the
990    device before asking the system operator to mount a tape.  However,
991    please note that the tape must be mounted before the job begins.
992
993 \end{description}
994
995 \subsection*{Messages Resource}
996 \label{MessagesResource1}
997 \index[general]{Resource!Messages}
998 \index[general]{Messages Resource}
999 \addcontentsline{toc}{subsection}{Messages Resource}
1000
1001 For a description of the Messages Resource, please see the 
1002 \ilink{Messages Resource}{_ChapterStart15} Chapter of this
1003 manual. 
1004
1005 \subsection*{Sample Storage Daemon Configuration File}
1006 \label{SampleConfiguration}
1007 \index[general]{File!Sample Storage Daemon Configuration}
1008 \index[general]{Sample Storage Daemon Configuration File}
1009 \addcontentsline{toc}{subsection}{Sample Storage Daemon Configuration File}
1010
1011 A example Storage Daemon configuration file might be the following: 
1012
1013 \footnotesize
1014 \begin{verbatim}
1015 #
1016 # Default Bacula Storage Daemon Configuration file
1017 #
1018 #  For Bacula release 1.37.2 (07 July 2005) -- gentoo 1.4.16
1019 #
1020 # You may need to change the name of your tape drive
1021 #   on the "Archive Device" directive in the Device
1022 #   resource.  If you change the Name and/or the
1023 #   "Media Type" in the Device resource, please ensure
1024 #   that bacula-dir.conf has corresponding changes.
1025 #
1026 Storage {                               # definition of myself
1027   Name = rufus-sd
1028   Address = rufus
1029   WorkingDirectory = "$HOME/bacula/bin/working"
1030   Pid Directory = "$HOME/bacula/bin/working"
1031   Maximum Concurrent Jobs = 20
1032 }
1033 #
1034 # List Directors who are permitted to contact Storage daemon
1035 #
1036 Director {
1037   Name = rufus-dir
1038   Password = "ZF9Ctf5PQoWCPkmR3s4atCB0usUPg+vWWyIo2VS5ti6k"
1039 }
1040 #
1041 # Restricted Director, used by tray-monitor to get the
1042 #   status of the storage daemon
1043 #
1044 Director {
1045   Name = rufus-mon
1046   Password = "9usxgc307dMbe7jbD16v0PXlhD64UVasIDD0DH2WAujcDsc6"
1047   Monitor = yes
1048 }
1049 #
1050 # Devices supported by this Storage daemon
1051 # To connect, the Director's bacula-dir.conf must have the
1052 #  same Name and MediaType.
1053 #
1054 Autochanger {
1055   Name = Autochanger
1056   Device = Drive-1
1057   Device = Drive-2
1058   Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d"
1059   Changer Device = /dev/sg0
1060 }
1061
1062 Device {
1063   Name = Drive-1                      #
1064   Drive Index = 0 
1065   Media Type = DLT-8000
1066   Archive Device = /dev/nst0
1067   AutomaticMount = yes;               # when device opened, read it
1068   AlwaysOpen = yes;
1069   RemovableMedia = yes;
1070   RandomAccess = no;
1071   AutoChanger = yes
1072   Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
1073 }
1074
1075 Device {
1076   Name = Drive-2                      #
1077   Drive Index = 1
1078   Media Type = DLT-8000
1079   Archive Device = /dev/nst1
1080   AutomaticMount = yes;               # when device opened, read it
1081   AlwaysOpen = yes;
1082   RemovableMedia = yes;
1083   RandomAccess = no;
1084   AutoChanger = yes
1085   Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
1086 }
1087
1088 Device {
1089   Name = "HP DLT 80"
1090   Media Type = DLT8000
1091   Archive Device = /dev/nst0
1092   AutomaticMount = yes;                 # when device opened, read it
1093   AlwaysOpen = yes;
1094   RemovableMedia = yes;
1095 }
1096 #Device {
1097 #  Name = SDT-7000                     #
1098 #  Media Type = DDS-2
1099 #  Archive Device = /dev/nst0
1100 #  AutomaticMount = yes;               # when device opened, read it
1101 #  AlwaysOpen = yes;
1102 #  RemovableMedia = yes;
1103 #}
1104 #Device {
1105 #  Name = Floppy
1106 #  Media Type = Floppy
1107 #  Archive Device = /mnt/floppy
1108 #  RemovableMedia = yes;
1109 #  Random Access = Yes;
1110 #  AutomaticMount = yes;               # when device opened, read it
1111 #  AlwaysOpen = no;
1112 #}
1113 #Device {
1114 #  Name = FileStorage
1115 #  Media Type = File
1116 #  Archive Device = /tmp
1117 #  LabelMedia = yes;                   # lets Bacula label unlabeled media
1118 #  Random Access = Yes;
1119 #  AutomaticMount = yes;               # when device opened, read it
1120 #  RemovableMedia = no;
1121 #  AlwaysOpen = no;
1122 #}
1123 #Device {
1124 #  Name = "NEC ND-1300A"
1125 #  Media Type = DVD
1126 #  Archive Device = /dev/hda
1127 #  LabelMedia = yes;                   # lets Bacula label unlabeled media
1128 #  Random Access = Yes;
1129 #  AutomaticMount = yes;               # when device opened, read it
1130 #  RemovableMedia = yes;
1131 #  AlwaysOpen = no;
1132 #  MaximumPartSize = 800M;
1133 #  RequiresMount = yes;
1134 #  MountPoint = /mnt/cdrom;
1135 #  MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
1136 #  UnmountCommand = "/bin/umount %m";
1137 #  SpoolDirectory = /tmp/backup;
1138 #  WritePartCommand = "/etc/bacula/dvd-writepart %e %a %v"
1139 #  FreeSpaceCommand = "/etc/bacula/dvd-freespace %a"
1140 #}
1141 #
1142 # A very old Exabyte with no end of media detection
1143 #
1144 #Device {
1145 #  Name = "Exabyte 8mm"
1146 #  Media Type = "8mm"
1147 #  Archive Device = /dev/nst0
1148 #  Hardware end of medium = No;
1149 #  AutomaticMount = yes;               # when device opened, read it
1150 #  AlwaysOpen = Yes;
1151 #  RemovableMedia = yes;
1152 #}
1153 #
1154 # Send all messages to the Director,
1155 # mount messages also are sent to the email address
1156 #
1157 Messages {
1158   Name = Standard
1159   director = rufus-dir = all
1160   operator = root = mount
1161 }
1162 \end{verbatim}
1163 \normalsize