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