]> git.sur5r.net Git - bacula/docs/blob - docs/manual/dirdconf.tex
Final changes
[bacula/docs] / docs / manual / dirdconf.tex
1 %%
2 %%
3
4 \section*{Configuring the Director}
5 \label{_ChapterStart40}
6 \index[general]{Director!Configuring the}
7 \index[general]{Configuring the Director}
8 \addcontentsline{toc}{section}{Configuring the Director}
9
10 Of all the configuration files needed to run {\bf Bacula}, the Director's is
11 the most complicated, and the one that you will need to modify the most often
12 as you add clients or modify the FileSets. 
13
14 For a general discussion of configuration files and resources including the
15 data types recognized by {\bf Bacula}. Please see the 
16 \ilink{Configuration}{_ChapterStart16} chapter of this manual. 
17
18 \subsection*{Director Resource Types}
19 \index[general]{Types!Director Resource}
20 \index[general]{Director Resource Types}
21 \addcontentsline{toc}{subsection}{Director Resource Types}
22
23 Director resource type may be one of the following: 
24
25 Job, JobDefs, Client, Storage, Catalog, Schedule, FileSet, Pool, Director,  or
26 Messages. We present them here in the most logical order for defining them: 
27
28 \begin{itemize}
29 \item 
30    \ilink{Director}{DirectorResource4} -- to  define the Director's
31    name and its access password used for authenticating the Console program.
32 Only a single  Director resource definition may appear in the Director's 
33 configuration file.  If you have either {\bf /dev/random} or  {\bf bc} on your
34 machine, Bacula will generate a random password during the configuration
35 process, otherwise it will  be left blank. 
36 \item 
37    \ilink{Job}{JobResource} -- to define the backup/restore Jobs 
38    and to tie together the Client, FileSet and Schedule resources to  be used
39    for each Job.  
40 \item 
41    \ilink{JobDefs}{JobDefsResource} -- optional resource for 
42    providing defaults for Job resources.  
43 \item 
44    \ilink{Schedule}{ScheduleResource} -- to define when a Job is to 
45    be automatically run by {\bf Bacula's} internal scheduler.  
46 \item 
47    \ilink{FileSet}{FileSetResource} -- to define the set of files 
48    to be backed up for each Client. 
49 \item 
50    \ilink{Client}{ClientResource2} -- to define what Client is  to be
51    backed up.  
52 \item 
53    \ilink{Storage}{StorageResource2} -- to define on what  physical
54    device the Volumes should be mounted. 
55 \item 
56    \ilink{Pool}{PoolResource} -- to define the pool of Volumes
57    that can be used for a particular Job. 
58 \item 
59    \ilink{Catalog}{CatalogResource} -- to define in what database to
60  keep the list of files and the Volume names where they are backed up.  
61 \item 
62    \ilink{Messages}{_ChapterStart15} -- to define where error  and
63    information messages are to be sent or logged. 
64 \end{itemize}
65
66 \subsection*{The Director Resource}
67 \label{DirectorResource4}
68 \index[general]{Director Resource}
69 \index[general]{Resource!Director}
70 \addcontentsline{toc}{subsection}{Director Resource}
71
72 The Director resource defines the attributes of the Directors running on the
73 network. In the current implementation, there is only a single Director
74 resource, but the final design will contain multiple Directors to maintain
75 index and media database redundancy. 
76
77 \begin{description}
78
79 \item [Director]
80    \index[dir]{Director}
81    Start of the Director resource. One and only one  director resource must be
82 supplied.  
83
84 \item [Name = \lt{}name\gt{}]
85    \index[dir]{Name }
86    The director name used by the system  administrator. This directive is
87 required.  
88
89 \item [Description = \lt{}text\gt{}]
90    \index[dir]{Description }
91    The text field contains a  description of the Director that will be displayed
92 in the  graphical user interface. This directive is optional.  
93
94 \item [Password = \lt{}UA-password\gt{}]
95    \index[dir]{Password }
96    Specifies the password that  must be supplied for the default Bacula Console
97 to be  authorized. The same password must appear in the  {\bf Director}
98 resource of the Console configuration file.  For added security, the password
99 is never actually passed  across the network but rather a challenge response
100 hash code  created with the password. This directive is required. If you  have
101 either {\bf /dev/random} or {\bf bc} on your machine,  Bacula will generate a
102 random password during the  configuration process, otherwise it will be left
103 blank and  you must manually supply it.  
104
105 \item [Messages = \lt{}Messages-resource-name\gt{}]
106    \index[dir]{Messages }
107    The messages resource  specifies where to deliver Director messages that are
108 not associated  with a specific Job. Most messages are specific to a job and
109 will  be directed to the Messages resource specified by the job. However, 
110 there are a few messages that can occur when no job is running.  This
111 directive is required.  
112
113 \item [Working Directory = \lt{}Directory\gt{}]
114    \index[dir]{Working Directory }
115    This directive  is mandatory and specifies a directory in which the Director 
116    may put its status files. This directory should be used only  by Bacula but
117    may be shared by other Bacula daemons. However, please note, if this
118    directory is shared with other Bacula daemons (the File daemon and Storage
119    daemon), you must ensure that the {\bf Name} given to each daemon is
120    unique so that the temporary filenames used do not collide.  By default
121    the Bacula configure process creates unique daemon names by postfixing them
122    with -dir, -fd, and -sd. Standard shell expansion of the {\bf
123    Directory}  is done when the configuration file is read so that values such 
124    as {\bf \$HOME} will be properly expanded. This directive is required.
125
126 \item [Pid Directory = \lt{}Directory\gt{}]
127    \index[dir]{Pid Directory }
128    This directive  is mandatory and specifies a directory in which the Director 
129 may put its process Id file. The process Id file is used to  shutdown
130 Bacula and to prevent multiple copies of  Bacula from running simultaneously. 
131 Standard shell expansion of the {\bf Directory}  is done when the
132 configuration file is read so that values such  as {\bf \$HOME} will be
133 properly expanded.  
134
135 Typically on Linux systems, you will set this to:  {\bf /var/run}. If you are
136 not installing Bacula in the  system directories, you can use the {\bf Working
137 Directory} as  defined above.  This directive is required.  
138
139 \item [Scripts Directory = \lt{}Directory\gt{}]
140    \index[dir]{Scripts Directory }
141    This directive is optional and, if defined, specifies a directory in which
142 the Director 
143 will look for the Python startup script {\bf DirStartup.py}. This directory
144 may be shared by other Bacula daemons.  Standard shell expansion of the
145 directory is done when the configuration file is read so that values such 
146 as {\bf \$HOME} will be properly expanded.
147
148 \item [QueryFile = \lt{}Path\gt{}]
149    \index[dir]{QueryFile }
150    This directive  is mandatory and specifies a directory and file in which the
151 Director  can find the canned SQL statements for the {\bf Query} command of 
152 the Console. Standard shell expansion of the {\bf Path} is done  when the
153 configuration file is read so that values such as  {\bf \$HOME} will be
154 properly expanded. This directive is required.  
155 \label{DirMaxConJobs}
156
157 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
158 \index[dir]{Maximum Concurrent Jobs }
159 \index[general]{Simultaneous Jobs}
160 \index[general]{Concurrent Jobs}
161    where \lt{}number\gt{}  is the maximum number of total Director Jobs that
162 should run  concurrently. The default is set to 1, but you may set it to a 
163 larger number.  
164
165 Please  note that the Volume format becomes much more complicated with 
166 multiple simultaneous jobs, consequently, restores can take much  longer if
167 Bacula must sort through interleaved volume blocks from  multiple simultaneous
168 jobs. This can be avoided by having each  simultaneously running job write to
169 a different volume or  by using data spooling, which will first spool the data
170 to disk simultaneously, then write each spool file to the  volume in
171 sequence.  
172
173 There may also still be some cases where directives such as  {\bf Maximum
174 Volume Jobs} are not properly synchronized with  multiple simultaneous jobs
175 (subtle timing issues can arise),  so careful testing is recommended. 
176
177 At the current time,  there is no configuration parameter set to limit the
178 number of console connections. A maximum of five simultaneous console 
179 connections are permitted.  
180
181 For more details on getting concurrent jobs to run, please  see 
182 \ilink{Running Concurrent Jobs}{ConcurrentJobs} in the Tips chapter
183 of this manual.  
184
185 \item [FD Connect Timeout = \lt{}time\gt{}]
186    \index[dir]{FD Connect Timeout }
187    where {\bf time}  is the time that the Director should continue attempting 
188 to
189 contact the File daemon to start a job, and after which the  Director will
190 cancel the job. The default is 30 minutes. 
191
192 \item [SD Connect Timeout = \lt{}time\gt{}]
193    \index[dir]{SD Connect Timeout }
194    where {\bf time}  is the time that the Director should continue attempting 
195 to
196 contact the Storage daemon to start a job, and after which the  Director will
197 cancel the job. The default is 30 minutes. 
198
199 \item [DirAddresses = \lt{}IP-address-specification\gt{}]
200    \index[dir]{DirAddresses }
201    Specify the ports and addresses on which the Director daemon will  listen for
202 Bacula Console connections. Probably the simplest way  to explain this is to
203 show
204 an example: 
205
206 \footnotesize
207 \begin{verbatim}
208  DirAddresses  = { ip = {
209         addr = 1.2.3.4; port = 1205;}
210     ipv4 = {
211         addr = 1.2.3.4; port = http;}
212     ipv6 = {
213         addr = 1.2.3.4;
214         port = 1205;
215    }
216     ip = {
217         addr = 1.2.3.4
218         port = 1205
219    }
220     ip = {
221         addr = 1.2.3.4
222    }
223     ip = {
224         addr = 201:220:222::2
225    }
226     ip = {
227         addr = bluedot.thun.net
228    }
229 }
230 \end{verbatim}
231 \normalsize
232
233 where ip, ip4, ip6, addr, and port are all keywords. Note, that  the address
234 can be specified as either a dotted quadruple, or  IPv6 colon notation, or as
235 a symbolic name (only in the ip specification).  Also, port can be specified
236 as a number or as the mnemonic value from  the /etc/services file.  If a port
237 is not specified, the default will be used. If an ip  section is specified,
238 the resolution can be made either by IPv4 or  IPv6. If ip4 is specified, then
239 only IPv4 resolutions will be permitted,  and likewise with ip6. 
240
241 \item [DIRport = \lt{}port-number\gt{}]
242    \index[dir]{DIRport }
243    Specify the port (a positive  integer) on which the  Director daemon will
244 listen for Bacula Console connections.  This same port number must be
245 specified in the Director resource  of the Console configuration file. The
246 default is 9101, so  normally this directive need not be specified.  This
247 directive is not needed if you specify DirAddresses. 
248
249 \item [DirAddress = \lt{}IP-Address\gt{}]
250    \index[dir]{DirAddress }
251    This directive is optional,  but if it is specified, it will cause the
252 Director server (for  the Console program) to bind to the specified {\bf
253 IP-Address},  which is either a domain name or an IP address specified as a 
254 dotted quadruple in string or quoted string format.  If this directive is not
255 specified, the Director  will bind to any available address (the default). 
256 Note, unlike the DirAddresses specification noted above, this  directive only
257 permits a single address to be specified.  This directive is not needed if you
258 specify a DirAddresses  (not plural). 
259 \end{description}
260
261 The following is an example of a valid Director resource definition: 
262
263 \footnotesize
264 \begin{verbatim}
265 Director {
266   Name = HeadMan
267   WorkingDirectory = "$HOME/bacula/bin/working"
268   Password = UA_password
269   PidDirectory = "$HOME/bacula/bin/working"
270   QueryFile = "$HOME/bacula/bin/query.sql"
271   Messages = Standard
272 }
273 \end{verbatim}
274 \normalsize
275
276 \subsection*{The Job Resource}
277 \label{JobResource}
278 \index[general]{Resource!Job}
279 \index[general]{Job Resource}
280 \addcontentsline{toc}{subsection}{Job Resource}
281
282 The Job resource defines a Job (Backup, Restore, ...) that Bacula must
283 perform. Each Job resource definition contains the name of a Client and
284 a FileSet to backup, the Schedule for the Job, where the data
285 are to be stored, and what media Pool can be used. In effect, each Job
286 resource must specify What, Where, How, and When or FileSet, Storage,
287 Backup/Restore/Level, and Schedule respectively. Note, the FileSet must
288 be specified for a restore job for historical reasons, but it is no longer used.
289
290 Only a single type ({\bf Backup}, {\bf Restore}, ...) can be specified for any
291 job. If you want to backup multiple FileSets on the same Client or multiple
292 Clients, you must define a Job for each one. 
293
294 \begin{description}
295
296 \item [Job]
297    \index[dir]{Job}
298    Start of the Job resource. At least one Job  resource is required. 
299
300 \item [Name = \lt{}name\gt{}]
301    \index[dir]{Name }
302    The Job name. This name can be specified  on the {\bf Run} command in the
303    console program to start a job. If the  name contains spaces, it must be
304    specified between quotes. It is  generally a good idea to give your job the
305    same name as the Client  that it will backup. This permits easy
306    identification of jobs.  
307
308    When the job actually runs, the unique Job Name will consist  of the name you
309    specify here followed by the date and time the  job was scheduled for
310    execution. This directive is required. 
311
312 \item [Type = \lt{}job-type\gt{}]
313    \index[dir]{Type }
314    The {\bf Type} directive specifies  the Job type, which may be one of the
315    following: {\bf Backup},  {\bf Restore}, {\bf Verify}, or {\bf Admin}. This
316    directive  is required. Within a particular Job Type, there are also Levels 
317    as discussed in the next item.  
318
319 \begin{description}
320
321 \item [Backup]
322    \index[dir]{Backup}
323    Run a backup Job. Normally you will  have at least one Backup job for each
324 client you want  to save. Normally, unless you turn off cataloging,  most all
325 the important statistics and data concerning  files backed up will be placed
326 in the catalog. 
327
328 \item [Restore]
329    \index[dir]{Restore}
330    Run a restore Job. Normally, you will  specify only one Restore job which
331 acts
332 as a sort  of prototype that you will modify using the console  program in
333 order to perform restores. Although certain  basic information from a Restore
334 job is saved in the  catalog, it is very minimal compared to the information 
335 stored for a Backup job -- for example, no File database  entries are
336 generated since no Files are saved.  
337
338 \item [Verify]
339    \index[dir]{Verify}
340    Run a verify Job. In general, {\bf verify}  jobs permit you to compare the
341 contents of the catalog  to the file system, or to what was backed up. In
342 addition,  to verifying that a tape that was written can be read,  you can
343 also use {\bf verify} as a sort of tripwire  intrusion detection.  
344
345 \item [Admin]
346    \index[dir]{Admin}
347    Run an admin Job. An {\bf Admin} job can  be used to periodically run catalog
348 pruning, if you  do not want to do it at the end of each {\bf Backup}  Job.
349 Although an Admin job is recorded in the  catalog, very little data is saved. 
350 \end{description}
351
352 \label{Level}
353
354 \item [Level = \lt{}job-level\gt{}]
355    \index[dir]{Level }
356    The Level directive specifies  the default Job level to be run. Each
357 different
358 Job Type (Backup, Restore, ...) has a different set of Levels  that can be
359 specified. The Level is normally overridden  by a different value that is
360 specified in the {\bf Schedule}  resource. This directive is not required, but
361 must be specified either  by a {\bf Level} directive or as an override
362 specified in the  {\bf Schedule} resource.  
363
364 For a {\bf Backup} Job, the Level may be one of the  following:  
365
366 \begin{description}
367
368 \item [Full]
369    \index[dir]{Full}
370    is all files in the FileSet whether or not they  have changed.  
371
372 \item [Incremental]
373    \index[dir]{Incremental}
374    is all files specified in the FileSet that have changed since the  last successful backup of the
375    the same Job using the same FileSet and Client.
376    If the  Director cannot find a previous valid Full backup then
377    the job will be  upgraded into a Full backup. When the Director looks for a 
378    valid backup record in the catalog database, it  looks for a previous
379    Job with:  
380
381 \begin{itemize}
382 \item The same Job name.  
383 \item The same Client name.  
384 \item The same FileSet (any change to the definition of  the FileSet such as
385    adding or deleting a file in the  Include or Exclude sections constitutes a
386    different FileSet.  
387 \item The Job was a Full, Differential, or Incremental backup.  
388 \item The Job terminated normally (i.e. did not fail or was not  canceled).  
389    \end{itemize}
390
391 If all the above conditions do not hold, the Director will upgrade  the
392 Incremental to a Full save. Otherwise, the Incremental  backup will be
393 performed as requested.  
394
395 The File daemon (Client) decides which files to backup for an  Incremental
396 backup by comparing start time of the prior Job  (Full, Differential, or
397 Incremental) against the time each file  was last "modified" (st\_mtime) and
398 the time its  attributes were last "changed"(st\_ctime). If the  file was
399 modified or its attributes changed on or after this  start time, it will then
400 be backed up.  
401
402 Please note that some  virus scanning software may change st\_ctime while
403 doing the  scan. For example, if the virus scanning program attempts  to
404 reset the access time (st\_atime), which Bacula does not use,  it will cause
405 st\_ctime to change and hence Bacula will backup  the file during an
406 Incremental or Differential backup. In the  case of Sophos virus scanning, you
407 can prevent it from  resetting the access time (st\_atime) and hence changing 
408 st\_ctime by using the {\bf \verb:--:no-reset-atime} option. For  other
409 software,
410 please see their manual.  
411
412 When Bacula does an Incremental backup, all modified  files that are still on
413 the system are backed up.  However, any file that has been deleted since the
414 last  Full backup remains in the Bacula catalog, which means  that if between
415 a Full save and the time you do a  restore, some files are deleted, those
416 deleted files  will also be restored. The deleted files will no longer  appear
417 in the catalog after doing another Full save.  However, to remove deleted
418 files from the catalog during an Incremental backup is quite a time consuming
419 process  and not currently implemented in Bacula. 
420
421 In addition, if you move a directory rather than copy it, the files in it do not
422 have their modification time (st\_mtime) or their attribute change time
423 (st\_ctime) 
424 changed. As a consequence, those files will probably not be backed up by an
425 Incremental
426 or Differential backup which depend solely on these time stamps. If you move a
427 directory,
428 and wish it to be properly backed up, it is generally preferable to copy it,
429 then
430 delete the original.
431
432 \item [Differential]
433    \index[dir]{Differential}
434    is all files specified in the FileSet that have changed since the last
435    successful Full backup of the same Job.  If the Director cannot find a
436    valid previous Full backup for the same Job, FileSet, and Client,
437    backup, then the Differential job will be upgraded into a Full backup.
438    When the Director looks for a valid Full backup record in the catalog
439    database, it looks for a previous Job with:
440
441 \begin{itemize}
442 \item The same Job name.  
443 \item The same Client name.  
444 \item The same FileSet (any change to the definition of  the FileSet such as
445    adding or deleting a file in the  Include or Exclude sections constitutes a
446    different FileSet.  
447 \item The Job was a FULL backup.  
448 \item The Job terminated normally (i.e. did not fail or was not  canceled).  
449 \end{itemize}
450
451 If all the above conditions do not hold, the Director will  upgrade the
452 Differential to a Full save. Otherwise, the  Differential backup will be
453 performed as requested.  
454
455 The File daemon (Client) decides which files to backup for a  differential
456 backup by comparing the start time of the prior  Full backup Job against the
457 time each file was last  "modified" (st\_mtime) and the time its attributes
458 were  last "changed" (st\_ctime). If the file was modified or its attributes
459 were changed on or after this start time, it will then be backed up. The
460 start time used is displayed after the  {\bf Since} on the Job report. In rare
461 cases, using the start  time of the prior backup may cause some files to be
462 backed up  twice, but it ensures that no change is missed. As with the 
463 Incremental option, you should ensure that the clocks on your  server and
464 client are synchronized or as close as possible to  avoid the possibility of a
465 file being skipped. Note, on  versions 1.33 or greater Bacula automatically
466 makes the  necessary adjustments to the time between the server and the  client
467 so that the times Bacula uses are synchronized.  
468
469 When Bacula does a Differential backup, all modified files that are still
470 on the system are backed up.  However, any file that has been deleted since
471 the last Full backup remains in the Bacula catalog, which means that if
472 between a Full save and the time you do a restore, some files are deleted,
473 those deleted files will also be restored.  The deleted files will no
474 longer appear in the catalog after doing another Full save.  However, to
475 remove deleted files from the catalog during a Differential backup is quite
476 a time consuming process and not currently implemented in Bacula.  It is,
477 however, a planned future feature.
478
479
480 As noted above, if you move a directory rather than copy it, the
481 files in it do not have their modification time (st\_mtime) or
482 their attribute change time (st\_ctime) changed.  As a
483 consequence, those files will probably not be backed up by an
484 Incremental or Differential backup which depend solely on these
485 time stamps.  If you move a directory, and wish it to be
486 properly backed up, it is generally preferable to copy it, then
487 delete the original. Alternatively, you can move the directory, then
488 use the {\bf touch} program to update the timestamps.
489
490 Every once and a while, someone asks why we need Differential
491 backups as long as Incremental backups pickup all changed files.
492 There are possibly many answers to this question, but the one
493 that is the most important for me is that it effectively combines
494 all the Incremental and Differential backups since the last Full 
495 backup into a single Differential backup. This has two effects:
496 1. It gives some redundancy. 2. More importantly, it reduces the
497 number of Volumes that are needed to do a restore effectively
498 eliminating the need to read all the volumes on which the
499 preceding Incremental and Differential backups since the last
500 Full are done.
501
502
503 \end{description}
504
505 For a {\bf Restore} Job, no level needs to be specified.  
506
507 For a {\bf Verify} Job, the Level may be one of the  following:  
508
509 \begin{description}
510
511 \item [InitCatalog]
512    \index[dir]{InitCatalog}
513    does a scan of the specified {\bf FileSet} and stores the file
514    attributes in the Catalog database.  Since no file data is saved, you
515    might ask why you would want to do this.  It turns out to be a very
516    simple and easy way to have a {\bf Tripwire} like feature using {\bf
517    Bacula}.  In other words, it allows you to save the state of a set of
518    files defined by the {\bf FileSet} and later check to see if those files
519    have been modified or deleted and if any new files have been added.
520    This can be used to detect system intrusion.  Typically you would
521    specify a {\bf FileSet} that contains the set of system files that
522    should not change (e.g.  /sbin, /boot, /lib, /bin, ...).  Normally, you
523    run the {\bf InitCatalog} level verify one time when your system is
524    first setup, and then once again after each modification (upgrade) to
525    your system.  Thereafter, when your want to check the state of your
526    system files, you use a {\bf Verify} {\bf level = Catalog}.  This
527    compares the results of your {\bf InitCatalog} with the current state of
528    the files.
529
530 \item [Catalog]
531    \index[dir]{Catalog}
532    Compares the current state of the files against the state previously
533    saved during an {\bf InitCatalog}.  Any discrepancies are reported.  The
534    items reported are determined by the {\bf verify} options specified on
535    the {\bf Include} directive in the specified {\bf FileSet} (see the {\bf
536    FileSet} resource below for more details).  Typically this command will
537    be run once a day (or night) to check for any changes to your system
538    files.
539
540    Please note!  If you run two Verify Catalog jobs on the same client at
541    the same time, the results will certainly be incorrect.  This is because
542    Verify Catalog modifies the Catalog database while running in order to
543    track new files.
544
545 \item [VolumeToCatalog]
546    \index[dir]{VolumeToCatalog}
547    This level causes Bacula to read  the file attribute data written to the
548 Volume from the last Job.  The file attribute data are compared to the values
549 saved in the  Catalog database and any differences are reported. This is 
550 similar to the {\bf Catalog} level except that instead of  comparing the disk
551 file attributes to the catalog database, the  attribute data written to the
552 Volume is read and compared to the  catalog database. Although the attribute
553 data including the  signatures (MD5 or SHA1) are compared, the actual file data
554 is not  compared (it is not in the catalog). 
555
556 Please note! If you  run two Verify VolumeToCatalog jobs on the same client at
557 the  same time, the results will certainly be incorrect. This is  because the
558 Verify VolumeToCatalog modifies the Catalog database  while running. 
559
560 \item [DiskToCatalog]
561    \index[dir]{DiskToCatalog}
562    This level causes Bacula to read the  files as they currently are on disk,
563 and
564 to compare the  current file attributes with the attributes saved in the 
565 catalog from the last backup for the job specified on  the {\bf VerifyJob}
566 directive. This level differs from the  {\bf Catalog} level described above by
567 the fact that it  doesn't compare against a previous Verify job but against a 
568 previous backup. When you run this level, you must supply the  verify options
569 on your Include statements. Those options  determine what attribute fields are
570 compared.  
571
572 This command can be very useful if you have disk problems  because it will
573 compare the current state of your disk against  the last successful backup,
574 which may be several jobs.  
575
576 Note, the current implementation (1.32c) does not  identify files that have
577 been deleted.  
578 \end{description}
579
580 \item [Verify Job = \lt{}Job-Resource-Name\gt{}]
581    \index[dir]{Verify Job }
582    If you run  a verify job without this directive, the last job run will  be
583 compared with the catalog, which means that you must  immediately follow a
584 backup by a verify command. If you  specify a {\bf Verify Job} Bacula will
585 find the last  job with that name that ran. This permits you to run  all your
586 backups, then run Verify jobs on those that  you wish to be verified (most
587 often a {\bf VolumeToCatalog})  so that the tape just written is re-read. 
588
589 \item [JobDefs = \lt{}JobDefs-Resource-Name\gt{}]
590    \index[dir]{JobDefs }
591    If a JobDefs-Resource-Name  is specified, all the values contained in the
592 named JobDefs resource  will be used as the defaults for the current Job. Any
593 value that  you explicitly define in the current Job resource, will override 
594 any defaults specified in the JobDefs resource. The use of this  directive
595 permits writing much more compact Job resources where the  bulk of the
596 directives are defined in one or more JobDefs. This  is particularly useful if
597 you have many similar Jobs but with  minor variations such as different
598 Clients. A simple example  of the use of JobDefs is provided in the default
599 bacula-dir.conf  file. 
600
601 \item [Bootstrap = \lt{}bootstrap-file\gt{}]
602    \index[dir]{Bootstrap }
603    The Bootstrap  directive specifies a bootstrap file that, if provided, will 
604 be used during {\bf Restore} Jobs and is ignored in other  Job types. The {\bf
605 bootstrap}  file contains the list of tapes to be used in a restore  Job as
606 well as which files are to be restored. Specification  of this directive is
607 optional, and  if specified, it is used only for a restore job. In addition, 
608 when running a Restore job from the console, this value can  be changed.  
609
610 If you use the {\bf Restore} command in the Console program,  to start a
611 restore job, the {\bf bootstrap}  file will be created automatically from the
612 files you  select to be restored.  
613
614 For additional details of the {\bf bootstrap} file, please see  
615 \ilink{Restoring Files with the Bootstrap File}{_ChapterStart43} 
616 chapter of this manual. 
617
618 \label{writebootstrap}
619 \item [Write Bootstrap =  \lt{}bootstrap-file-specification\gt{}]
620    \index[dir]{a name}
621    The  {\bf writebootstrap} directive specifies a file name where  Bacula will
622 write a {\bf bootstrap} file for each Backup job  run. Thus this directive
623 applies only to Backup Jobs. If the Backup  job is a Full save, Bacula will
624 erase any current contents of  the specified file before writing the bootstrap
625 records. If the Job  is an Incremental save, Bacula will append the current 
626 bootstrap record to the end of the file.  
627
628 Using this feature,  permits you to constantly have a bootstrap file that can
629 recover the  current state of your system. Normally, the file specified should
630 be a mounted drive on another machine, so that if your hard disk is  lost,
631 you will immediately have a bootstrap record available.  Alternatively, you
632 should copy the bootstrap file to another machine  after it is updated.  
633
634 If the {\bf bootstrap-file-specification} begins with a  vertical bar (|),
635 Bacula will use the specification as the  name of a program to which it will
636 pipe the bootstrap record.  It could for example be a shell script that emails
637 you the  bootstrap record. 
638
639 For more details on using this file,  please see the chapter entitled 
640 \ilink{The Bootstrap File}{_ChapterStart43} of this manual. 
641
642 \item [Client = \lt{}client-resource-name\gt{}]
643    \index[dir]{Client }
644    The Client directive  specifies the Client (File daemon) that will be used in
645    the  current Job. Only a single Client may be specified in any one Job.  The
646    Client runs on the machine to be backed up,  and sends the requested files to
647    the Storage daemon for backup,  or receives them when restoring. For
648    additional details, see the  
649    \ilink{Client Resource section}{ClientResource2} of this chapter.
650    This directive is required. 
651
652 \item [FileSet = \lt{}FileSet-resource-name\gt{}]
653    \index[dir]{FileSet }
654    The FileSet directive  specifies the FileSet that will be used in the 
655 current
656    Job. The FileSet specifies which directories (or files)  are to be backed up,
657    and what options to use (e.g. compression, ...).  Only a single FileSet
658    resource may be specified in any one Job.  For additional details, see the  
659    \ilink{FileSet Resource section}{FileSetResource} of this
660    chapter. This directive is required. 
661
662 \item [Messages = \lt{}messages-resource-name\gt{}]
663    \index[dir]{Messages }
664    The Messages directive  defines what Messages resource should be used for
665 this
666    job, and thus  how and where the various messages are to be delivered. For
667    example,  you can direct some messages to a log file, and others can be  sent
668    by email. For additional details, see the  
669    \ilink{Messages Resource}{_ChapterStart15} Chapter of this 
670    manual. This directive is required. 
671
672 \item [Pool = \lt{}pool-resource-name\gt{}]
673    \index[dir]{Pool }
674    The Pool directive defines the pool of Volumes where your data can be backed
675    up. Many Bacula  installations will use only the {\bf Default} pool. However,
676    if  you want to specify a different set of Volumes for different  Clients or
677    different Jobs, you will probably want to use Pools.  For additional details,
678    see the 
679    \ilink{Pool Resource section}{PoolResource} of this chapter. This
680    directive is required. 
681
682 \item [Full Backup Pool = \lt{}pool-resource-name\gt{}]
683    \index[dir]{Full Backup Pool }
684    The {\it Full Backup Pool} specifies a Pool to be used for  Full backups. It
685    will override any Pool specification during a  Full backup. This directive is
686    optional. 
687    
688 \item [Differential Backup Pool = \lt{}pool-resource-name\gt{}]  
689    \index[dir]{Differential Backup Pool }
690    The {\it Differential Backup Pool} specifies a Pool to be used for 
691    Differential backups. It will override any Pool specification during a 
692    Differential backup. This directive is optional. 
693    
694 \item [Incremental Backup Pool = \lt{}pool-resource-name\gt{}]  
695    \index[dir]{Incremental Backup Pool }
696    The {\it Incremental Backup Pool} specifies a Pool to be used for 
697 Incremental
698    backups. It will override any Pool specification during an  Incremental
699 backup.
700    This directive is optional. 
701
702 \item [Schedule = \lt{}schedule-name\gt{}]
703    \index[dir]{Schedule }
704    The Schedule directive defines what schedule is to be used for the Job.
705    The schedule in turn determines when the Job will be automatically
706    started and what Job level (i.e.  Full, Incremental, ...) is to be run.
707    This directive is optional, and if left out, the Job can only be started
708    manually using the Console program.  Although you may specify only a
709    single Schedule resource for any one job, the Schedule resource may
710    contain multiple {\bf Run} directives, which allow you to run the Job at
711    many different times, and each {\bf run} directive permits overriding
712    the default Job Level Pool, Storage, and Messages resources.  This gives
713    considerable flexibility in what can be done with a single Job.  For
714    additional details, see the \ilink{Schedule Resource
715    Chapter}{ScheduleResource} of this manual.
716           
717
718 \item [Storage = \lt{}storage-resource-name\gt{}]
719    \index[dir]{Storage }
720    The Storage directive  defines the name of the storage services where you
721 want
722    to backup  the FileSet data. For additional details, see the 
723    \ilink{Storage Resource Chapter}{StorageResource2} of this manual.
724     This directive is required.  
725
726 \item [Max Start Delay = \lt{}time\gt{}]
727    \index[dir]{Max Start Delay }
728    The time specifies the maximum delay between the scheduled time and the
729    actual start time for the Job.  For example, a job can be scheduled to
730    run at 1:00am, but because other jobs are running, it may wait to run.
731    If the delay is set to 3600 (one hour) and the job has not begun to run
732    by 2:00am, the job will be canceled.  This can be useful, for example,
733    to prevent jobs from running during day time hours.  The default is 0
734    which indicates no limit.
735
736 \item [Max Run Time = \lt{}time\gt{}]
737    \index[dir]{Max Run Time }
738    The time specifies the maximum allowed time that a job may run, counted
739    from when the job starts, ({\bf not} necessarily the same as when the
740    job was scheduled).  This directive is implemented in version 1.33 and
741    later.
742
743 \item [Max Wait Time = \lt{}time\gt{}]
744    \index[dir]{Max Wait Time }
745    The time specifies the maximum allowed time that a job may block waiting
746    for a resource (such as waiting for a tape to be mounted, or waiting for
747    the storage or file daemons to perform their duties), counted from the
748    when the job starts, ({\bf not} necessarily the same as when the job was
749    scheduled).  This directive is implemented only in version 1.33 and
750    later.
751
752
753
754 \item [Incremental Max Wait Time = \lt{}time\gt{}]
755    \index[dir]{Incremental Max Wait Time }
756    The time specifies the maximum allowed time that an Incremental backup
757    job may block waiting for a resource (such as waiting for a tape to be
758    mounted, or waiting for the storage or file daemons to perform their
759    duties), counted from the when the job starts, ({\bf not} necessarily
760    the same as when the job was scheduled).  Please note that if there is a
761    {\bf Max Wait Time} it may also be applied to the job.
762
763 \item [Differential Max Wait Time = \lt{}time\gt{}]
764    \index[dir]{Differential Max Wait Time }
765    The time specifies the maximum allowed time that a Differential backup
766    job may block waiting for a resource (such as waiting for a tape to be
767    mounted, or waiting for the storage or file daemons to perform their
768    duties), counted from the when the job starts, ({\bf not} necessarily
769    the same as when the job was scheduled).  Please note that if there is a
770    {\bf Max Wait Time} it may also be applied to the job.
771
772 \item [Prefer Mounted Volumes = \lt{}yes|no\gt{}]
773    \index[dir]{Prefer Mounted Volumes}
774    It the Prefer Mounted Volumes directive is set to {\bf yes}
775    (default yes), it is used to inform the Storage daemon
776    to select either an Autochanger or a drive with a valid
777    Volume already mounted in preference to a drive that is
778    not ready. If none is available, it will select the first 
779    available drive. If the directive is set to {\bf no}, the
780    Storage daemon will prefer finding an unused drive. This
781    can potentially be useful for those sites that prefer to
782    maximum backup throughput at the expense of using additional
783    drives and Volumes.
784
785
786 \item [Prune Jobs = \lt{}yes|no\gt{}]
787    \index[dir]{Prune Jobs }
788    Normally, pruning of Jobs from the Catalog is specified on a Client by
789    Client basis in the Client resource with the {\bf AutoPrune} directive.
790    If this directive is specified (not normally) and the value is {\bf
791    yes}, it will override the value specified in the Client resource.  The
792    default is {\bf no}.
793
794
795 \item [Prune Files = \lt{}yes|no\gt{}]
796    \index[dir]{Prune Files }
797    Normally, pruning of Files from the Catalog is specified on a Client by
798    Client basis in the Client resource with the {\bf AutoPrune} directive.
799    If this directive is specified (not normally) and the value is {\bf
800    yes}, it will override the value specified in the Client resource.  The
801    default is {\bf no}.
802
803 \item [Prune Volumes = \lt{}yes|no\gt{}]
804    \index[dir]{Prune Volumes }
805    Normally, pruning of Volumes from the Catalog is specified on a Client
806    by Client basis in the Client resource with the {\bf AutoPrune}
807    directive.  If this directive is specified (not normally) and the value
808    is {\bf yes}, it will override the value specified in the Client
809    resource.  The default is {\bf no}.
810
811 \item [Run Before Job = \lt{}command\gt{}]
812    \index[dir]{Run Before Job }
813    The specified {\bf command} is run as an external program prior to
814    running the current Job.  Any output sent by the command to standard output
815    will be included in the Bacula job report.  The command string must be a
816    valid program name or name of a shell script.  This directive is not
817    required, but if it is defined, and if the exit code of the program run
818    is non-zero, the current Bacula job will be canceled.  In addition, the
819    command string is parsed then fed to the execvp() function, which means
820    that the path will be searched to execute your specified command, but
821    there is no shell interpretation, as a consequence, if you invoke
822    complicated commands or want any shell features such as redirection or
823    piping, you must call a shell script and do it inside that script.
824  
825    Before submitting the specified command to the operating system, Bacula
826    performs character substitution of the following characters:
827   
828 \footnotesize
829 \begin{verbatim}
830     %% = %
831     %c = Client's name
832     %d = Director's name
833     %i = JobId
834     %e = Job Exit Status
835     %j = Unique Job name
836     %l = Job Level
837     %n = Job name
838     %t = Job type
839     %v = Volume name
840     
841 \end{verbatim}
842 \normalsize
843
844 The Job Exit Status code \%e edits the following values:
845
846 \index[dir]{Exit Status}
847 \begin{itemize}
848 \item OK
849 \item Error
850 \item Fatal Error
851 \item Canceled
852 \item Differences
853 \item Unknown term code
854 \end{itemize}
855
856    Thus if you edit it on a command line, you will need to enclose 
857    it within some sort of quotes.
858    
859    Bacula checks the exit status of the RunBeforeJob program.  If it is
860    non-zero, the job will be error terminated.  Lutz Kittler has pointed
861    out that using the RunBeforJob directive can be a simple way to modify
862    your schedules during a holiday.  For example, suppose that you normally
863    do Full backups on Fridays, but Thursday and Friday are holidays.  To
864    avoid having to change tapes between Thursday and Friday when no one is
865    in the office, you can create a RunBeforeJob that returns a non-zero
866    status on Thursday and zero on all other days.  That way, the Thursday
867    job will not run, and on Friday the tape you inserted on Wednesday
868    before leaving will be used.
869
870 \item [Run After Job = \lt{}command\gt{}]
871    \index[dir]{Run After Job }
872    The specified {\bf command} is run as an external program after the
873    current job terminates.  This directive is not required.  The command
874    string must be a valid program name or name of a shell script.  If the
875    exit code of the program run is non-zero, the current Bacula job will
876    terminate in error.  Before submitting the specified command to the
877    operating system, Bacula performs character substitution as described
878    above for the {\bf Run Before Job} directive.
879    
880    An example of the use of this directive is given in the  
881    \ilink{Tips Chapter}{JobNotification} of this manual.  As of version
882    1.30, Bacula checks the exit status of the RunAfter  program. If it is
883    non-zero, the job will be terminated in error.  
884
885 \item [Client Run Before Job = \lt{}command\gt{}]
886    \index[dir]{Client Run Before Job }
887    This directive  is the same as {\bf Run Before Job} except that the program is  run on
888    the client machine. The same restrictions apply to  Unix systems as noted
889    above for the {\bf Run Before Job}. In  addition, for a Windows client on
890    version 1.33 and above, please  take careful note that you must ensure a
891    correct path to your  script. The script or program can be a .com, .exe or
892    a .bat  file. However, if you specify a path, you must also specify  the full
893    extension. Unix like commands will not work unless you  have installed and
894    properly configured Cygwin in addition to  and separately from Bacula.  
895    
896    {\bf Special Windows Considerations}
897    The command can be anything that cmd.exe or command.com will  recognize as an
898    executable file. Specifying the executable's  extension is optional, unless
899    there is an ambiguity. (i.e.  ls.bat, ls.exe)  
900    
901    The System \%Path\% will be searched for the command. (under  the environment
902    variable dialog you have have both System  Environment and User Environment,
903    we believe that only the  System environment will be available to bacula-fd,
904    if it is  running as a service.)  
905    
906    System environment variables can be referenced with \%var\% and
907    used as either part of the command name or  arguments.  
908    
909    When specifying a full path to an executable if the path or  executable name
910    contains whitespace or special characters they  will need to be quoted.
911    Arguments containing whitespace or  special characters will also have to be
912    quoted. 
913
914 \footnotesize
915 \begin{verbatim}
916 ClientRunBeforeJob = "\"C:/Program Files/Software
917      Vendor/Executable\" /arg1 /arg2 \"foo bar\""
918 \end{verbatim}
919 \normalsize
920
921    The special characters \&()[]\{\}\^{}=;!'+,`\~{} will need to be quoted  if
922    they are part of a filename or argument.  
923    
924    If someone is logged in, a blank "command" window running the  commands
925 will
926    be present during the execution of the command.  
927    
928    Some Suggestions from Phil Stracchino for running on Win32 machines  with the
929    native Win32 File daemon: 
930
931    \begin{enumerate}
932    \item You might want the ClientRunBeforeJob directive to specify a .bat file
933       which  runs the actual client-side commands, rather than trying to run
934 (for 
935       example) regedit /e directly.  
936    \item The batch file should explicitly 'exit 0' on successful completion.  
937    \item The path to the batch file should be specified in Unix form:  
938    
939       ClientRunBeforeJob = "c:/bacula/bin/systemstate.bat"  
940    
941    rather than DOS/Windows form:  
942    
943    ClientRunBeforeJob =
944   
945 "c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}systemstate.bat"
946    INCORRECT 
947    \end{enumerate}
948    
949 The following example of the use of the Client Run Before Job directive was 
950 submitted by a user:\\
951 You could write a shell script to back up a DB2 database to a FIFO. The shell
952 script is:
953
954 \footnotesize
955 \begin{verbatim}
956  #!/bin/sh
957  # ===== backupdb.sh
958  DIR=/u01/mercuryd
959  
960  mkfifo $DIR/dbpipe
961  db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING &
962  sleep 1
963 \end{verbatim}
964 \normalsize
965  
966 The following line in the Job resource in the bacula-dir.conf file:
967 \footnotesize
968 \begin{verbatim}
969  Client Run Before Job = "su - mercuryd -c \"/u01/mercuryd/backupdb.sh '%t'
970 '%l'\""
971 \end{verbatim}
972 \normalsize
973  When the job is run, you will get messages from the output of the script
974 stating 
975  that the backup has started. Even though the command being run is 
976  backgrounded with \&, the job will block until the "db2 BACKUP DATABASE"
977 command,
978  thus the backup stalls.
979  
980  To remedy this situation, the "db2 BACKUP DATABASE" line should be changed to
981 the following:
982  
983 \footnotesize
984 \begin{verbatim} 
985  db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING > $DIR/backup.log
986 2>&1 < /dev/null &
987 \end{verbatim}
988 \normalsize
989
990 It is important to redirect the input and outputs of a backgrounded command to
991 /dev/null to prevent the script from blocking.
992
993
994 \item [Client Run After Job = \lt{}command\gt{}]
995    \index[dir]{Client Run After Job }
996    This directive  is the same as {\bf Run After Job} except that it is  run on
997 the
998    client machine. Note, please see the notes above  in {\bf Client Run Before
999    Job} concerning Windows clients. 
1000
1001 \item [Rerun Failed Levels = \lt{}yes|no\gt{}]
1002    \index[dir]{Rerun Failed Levels }
1003    If this directive  is set to {\bf yes} (default no), and Bacula detects that
1004 a
1005    previous job at a higher level (i.e. Full or Differential)  has failed, the
1006    current job level will be upgraded to the  higher level. This is particularly
1007    useful for Laptops where  they may often be unreachable, and if a prior Full
1008    save has  failed, you wish the very next backup to be a Full save  rather
1009 than
1010    whatever level it is started as. 
1011
1012 \item [Spool Data = \lt{}yes|no\gt{}]
1013    \index[dir]{Spool Data }
1014    If this directive is set  to {\bf yes} (default no), the Storage daemon will
1015 be requested  to spool the data for this Job to disk rather than write it 
1016 directly to tape. Once all the data arrives or the spool files' maximum sizes
1017 are reached, the data will be despooled and written  to tape. When this
1018 directive is set to yes, the Spool Attributes  is also automatically set to
1019 yes. Spooling data prevents tape  shoe-shine (start and stop) during
1020 Incremental saves. This option  should not be used if you are writing to a
1021 disk file. 
1022
1023 \item [Spool Attributes = \lt{}yes|no\gt{}]
1024    \index[dir]{Spool Attributes }
1025    The default is set to  {\bf no}, which means that the File attributes are
1026 sent
1027 by the  Storage daemon to the Director as they are stored on tape. However, 
1028 if you want to avoid the possibility that database updates will  slow down
1029 writing to the tape, you may want to set the value to  {\bf yes}, in which
1030 case the Storage daemon will buffer the  File attributes and Storage
1031 coordinates to a temporary file  in the Working Directory, then when writing
1032 the Job data to the tape is  completed, the attributes and storage coordinates
1033 will be  sent to the Director. 
1034
1035 \item [Where = \lt{}directory\gt{}]
1036    \index[dir]{Where }
1037    This directive applies only  to a Restore job and specifies a prefix to the
1038 directory name  of all files being restored. This permits files to be restored
1039 in a different location from which they were saved. If {\bf Where}  is not
1040 specified or is set to backslash ({\bf /}), the files  will be restored to
1041 their original location. By default, we  have set {\bf Where} in the example
1042 configuration files to be  {\bf /tmp/bacula-restores}. This is to prevent
1043 accidental overwriting  of your files. 
1044
1045 \item [Replace = \lt{}replace-option\gt{}]
1046    \index[dir]{Replace }
1047    This directive applies only  to a Restore job and specifies what happens when
1048 Bacula wants to  restore a file or directory that already exists. You have the
1049  following options for {\bf replace-option}:  
1050
1051 \begin{description}
1052
1053 \item [always]
1054    \index[dir]{always}
1055   when the file to be restored already exists,  it is deleted and then replaced
1056 by
1057   the copy that was backed up.  
1058
1059 \item [ifnewer]
1060    \index[dir]{ifnewer}
1061   if the backed up file (on tape) is newer than the  existing file, the existing
1062   file is deleted and replaced by  the back up.  
1063
1064 \item [ifolder]
1065    \index[dir]{ifolder}
1066   if the backed up file (on tape) is older than the  existing file, the existing
1067   file is deleted and replaced by  the back up.  
1068
1069 \item [never]
1070    \index[dir]{never}
1071   if the backed up file already exists, Bacula skips  restoring this file.  
1072 \end{description}
1073
1074 \item [Prefix Links=\lt{}yes|no\gt{}]
1075    \index[dir]{Prefix Links}
1076    If a {\bf Where} path prefix is specified for a recovery job, apply it
1077    to absolute links as well.  The default is {\bf No}.  When set to {\bf
1078    Yes} then while restoring files to an alternate directory, any absolute
1079    soft links will also be modified to point to the new alternate
1080    directory.  Normally this is what is desired -- i.e.  everything is self
1081    consistent.  However, if you wish to later move the files to their
1082    original locations, all files linked with absolute names will be broken.
1083
1084 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
1085    \index[dir]{Maximum Concurrent Jobs }
1086    where \lt{}number\gt{} is the maximum number of Jobs from the current
1087    Job resource that can run concurrently.  Note, this directive limits
1088    only Jobs with the same name as the resource in which it appears.  Any
1089    other restrictions on the maximum concurrent jobs such as in the
1090    Director, Client, or Storage resources will also apply in addition to
1091    the limit specified here.  The default is set to 1, but you may set it
1092    to a larger number.  We strongly recommend that you read the WARNING
1093    documented under \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the
1094    Director's resource.
1095
1096 \item [Reschedule On Error = \lt{}yes|no\gt{}]
1097    \index[dir]{Reschedule On Error }
1098    If this directive is enabled, and the job terminates in error, the job
1099    will be rescheduled as determined by the {\bf Reschedule Interval} and
1100    {\bf Reschedule Times} directives.  If you cancel the job, it will not
1101    be rescheduled.  The default is {\bf no} (i.e.  the job will not be
1102    rescheduled).
1103
1104
1105    This specification can be useful for portables, laptops, or other
1106    machines that are not always connected to the network or switched on.
1107
1108 \item [Reschedule Interval = \lt{}time-specification\gt{}]
1109    \index[dir]{Reschedule Interval }
1110    If you have specified {\bf Reschedule On Error = yes} and the job
1111    terminates in error, it will be rescheduled after the interval of time
1112    specified by {\bf time-specification}.  See \ilink{the time
1113    specification formats}{Time} in the Configure chapter for details of
1114    time specifications.  If no interval is specified, the job will not be
1115    rescheduled on error.
1116
1117 \item [Reschedule Times = \lt{}count\gt{}]
1118    \index[dir]{Reschedule Times }
1119    This directive specifies the maximum number of times to reschedule the
1120    job.  If it is set to zero (the default) the job will be rescheduled an
1121    indefinite number of times.
1122
1123 \item [Run = \lt{}job-name\gt{}]
1124    \index[dir]{Run directive}
1125    \index[dir]{Clone a Job}
1126    The Run directive (not to be confused with the Run option in a 
1127    Schedule) allows you to start other jobs or to clone jobs. By using the
1128    cloning keywords (see below), you can backup
1129    the same data (or almost the same data) to two or more drives
1130    at the same time. The {\bf job-name} is normally the same name
1131    as the current Job resource (thus creating a clone). However, it
1132    may be any Job name, so one job may start other related jobs.
1133
1134    The part after the equal sign must be enclosed in double quotes,
1135    and can contain any string or set of options (overrides) that you
1136    can specify when entering the Run command from the console. For
1137    example {\bf storage=DDS-4 ...}.  In addition, there are two special
1138    keywords that permit you to clone the current job. They are {\bf level=\%l}
1139    and {\bf since=\%s}. The \%l in the level keyword permits 
1140    entering the actual level of the current job and the \%s in the since
1141    keyword permits putting the same time for comparison as used on the
1142    current job.  Note, in the case of the since keyword, the \%s must be
1143    enclosed in double quotes, and thus they must be preceded by a backslash
1144    since they are already inside quotes. For example:
1145
1146 \begin{verbatim}
1147    run = "Nightly-backup level=%s since=\"%s\" storage=DDS-4"
1148 \end{verbatim}
1149
1150
1151    A cloned job will not start additional clones, so it is not
1152    possible to recurse.
1153
1154    
1155
1156 \label{Priority}
1157 \item [Priority = \lt{}number\gt{}]
1158    \index[dir]{Priority }
1159    This directive permits you to control the order in which your jobs run
1160    by specifying a positive non-zero number.  The higher the number, the
1161    lower the job priority.  Assuming you are not running concurrent jobs,
1162    all queued jobs of priority 1 will run before queued jobs of priority 2
1163    and so on, regardless of the original scheduling order.
1164
1165    The priority only affects waiting jobs that are queued to run, not jobs
1166    that are already running.  If one or more jobs of priority 2 are already
1167    running, and a new job is scheduled with priority 1, the currently
1168    running priority 2 jobs must complete before the priority 1 job is run.
1169
1170    The default priority is 10.  
1171
1172    If you want to run concurrent jobs, which is not recommended, you should 
1173 keep
1174    these points in mind:  
1175
1176 \begin{itemize}
1177 \item To run concurrent jobs,  you must set Maximum Concurrent Jobs = 2 in 5
1178    or 6 distinct places:  in bacula-dir.conf in the Director, the Job, the
1179    Client, the Storage  resources; in bacula-fd in the FileDaemon (or Client)
1180    resource,  and in bacula-sd.conf in the Storage resource. If any one  is
1181    missing, it will throttle the jobs to one at a time.  
1182 \item Bacula concurrently runs jobs of only one priority at a time. It will 
1183    not simultaneously run a priority 1 and a priority 2 job.  
1184 \item If Bacula is running a priority 2 job and a new priority 1  job is
1185    scheduled, it will wait until the running priority 2 job  terminates even if
1186    the Maximum Concurrent Jobs settings  would otherwise allow two jobs to run
1187    simultaneously.  
1188 \item Suppose that bacula is running a priority 2 job and a new priority 1  job
1189    is scheduled and queued waiting for the running priority  2 job to terminate.
1190    If you then start a second priority 2 job,  the waiting priority 1 job  will
1191    prevent the new priority 2 job from running concurrently  with the running
1192    priority 2 job.  That is: as long as there is a higher priority job waiting
1193    to
1194    run, no new lower priority jobs will start even if  the Maximum Concurrent
1195    Jobs settings would normally allow  them to run. This ensures that higher
1196    priority jobs will  be run as soon as possible. 
1197 \end{itemize}
1198
1199 If you have several jobs of different priority, it may not best to start
1200 them at exactly the same time, because Bacula must examine them one at a
1201 time.  If by Bacula starts a lower priority job first, then it will run
1202 before your high priority jobs.  If you experience this problem, you may
1203 avoid it by starting any higher priority jobs a few seconds before lower
1204 priority ones.  This insures that Bacula will examine the jobs in the
1205 correct order, and that your priority scheme will be respected.
1206
1207 \label{WritePartAfterJob}
1208 \item [Write Part After Job = \lt{}yes|no\gt{}]
1209    \index[dir]{Write Part After Job }
1210    This directive is only implemented in version 1.37 and later.
1211    If this directive is set to {\bf yes} (default {\bf no}), a new part file
1212    will be created after the job is finished.  
1213
1214    It should be set to {\bf yes} when writing to devices that require mount
1215    (for example DVD), so you are sure that the current part, containing
1216    this job's data, is written to the device, and that no data is left in
1217    the temporary file on the hard disk.  However, on some media, like DVD+R
1218    and DVD-R, a lot of space (about 10Mb) is lost everytime a part is
1219    written.  So, if you run several jobs each after another, you could set
1220    this directive to {\bf no} for all jobs, except the last one, to avoid
1221    wasting too much space, but to ensure that the data is written to the
1222    medium when all jobs are finished.
1223
1224    It is ignored with tape and FIFO devices.  
1225 \end{description}
1226
1227 The following is an example of a valid Job resource definition: 
1228
1229 \footnotesize
1230 \begin{verbatim}
1231 Job {
1232   Name = "Minou"
1233   Type = Backup
1234   Level = Incremental                 # default
1235   Client = Minou
1236   FileSet="Minou Full Set"
1237   Storage = DLTDrive
1238   Pool = Default
1239   Schedule = "MinouWeeklyCycle"
1240   Messages = Standard
1241 }
1242 \end{verbatim}
1243 \normalsize
1244
1245 \subsection*{The JobDefs Resource}
1246 \label{JobDefsResource}
1247 \index[general]{JobDefs Resource}
1248 \index[general]{Resource!JobDefs}
1249 \addcontentsline{toc}{subsection}{JobDefs Resource}
1250
1251 The JobDefs resource permits all the same directives that can appear in a Job
1252 resource. However, a JobDefs resource does not create a Job, rather it can be
1253 referenced within a Job to provide defaults for that Job. This permits you to
1254 concisely define several nearly identical Jobs, each one referencing a JobDefs
1255 resource which contains the defaults. Only the changes from the defaults need to
1256 be mentioned in each Job. 
1257
1258 \subsection*{The Schedule Resource}
1259 \label{ScheduleResource}
1260 \index[general]{Resource!Schedule}
1261 \index[general]{Schedule Resource}
1262 \addcontentsline{toc}{subsection}{Schedule Resource}
1263
1264 The Schedule resource provides a means of automatically scheduling a Job as
1265 well as the ability to override the default Level, Pool, Storage and Messages
1266 resources. If a Schedule resource is not referenced in a Job, the Job can only
1267 be run manually. In general, you specify an action to be taken and when. 
1268
1269 \begin{description}
1270
1271 \item [Schedule]
1272    \index[dir]{Schedule}
1273    Start of the Schedule directives. No {\bf Schedule}  resource is required,
1274 but
1275 you will need at least one if you want  Jobs to be automatically started. 
1276
1277 \item [Name = \lt{}name\gt{}]
1278    \index[dir]{Name }
1279    The name of the schedule being defined.  The Name directive is required. 
1280
1281 \item [Run = \lt{}Job-overrides\gt{} \lt{}Date-time-specification\gt{}]
1282    \index[dir]{Run }
1283    The Run directive defines when a Job is to be run,  and what overrides if any
1284 to apply. You may specify multiple  {\bf run} directives within a {\bf
1285 Schedule} resource. If you  do, they will all be applied (i.e. multiple
1286 schedules). If you  have two {\bf Run} directives that start at the same time,
1287 two  Jobs will start at the same time (well, within one second of  each
1288 other).  
1289
1290 The {\bf Job-overrides} permit overriding the Level, the  Storage, the
1291 Messages, and the Pool specifications  provided in the Job resource. In
1292 addition, the  FullPool, the IncrementalPool, and the  DifferentialPool
1293 specifications permit overriding the  Pool specification according to what
1294 backup Job Level is  in effect.  
1295
1296 By the use of overrides, you  may customize a particular Job. For example, you
1297 may specify a  Messages override for your Incremental backups that  outputs
1298 messages to a log file, but for your weekly or monthly  Full backups, you may
1299 send the output by email by using  a different Messages override.  
1300
1301 {\bf Job-overrides} are specified as:  {\bf keyword=value} where the keyword
1302 is Level, Storage,  Messages, Pool, FullPool, DifferentialPool, or
1303 IncrementalPool, and  the {\bf value} is as defined on the respective
1304 directive formats for  the Job resource. You may specify multiple {\bf
1305 Job-overrides} on  one {\bf Run} directive by separating them with one or more
1306 spaces or  by separating them with a trailing comma.  For example:  
1307
1308 \begin{description}
1309
1310 \item [Level=Full]
1311    \index[dir]{Level}
1312    is all files in the FileSet whether or not  they have changed.  
1313
1314 \item [Level=Incremental]
1315    \index[dir]{Level}
1316    is all files that have changed since  the last backup.  
1317
1318 \item [Pool=Weekly]
1319    \index[dir]{Pool}
1320    specifies to use the Pool named {\bf Weekly}.  
1321
1322 \item [Storage=DLT\_Drive]
1323    \index[dir]{Storage}
1324    specifies to use {\bf DLT\_Drive} for  the storage device.  
1325
1326 \item [Messages=Verbose]
1327    \index[dir]{Messages}
1328    specifies to use the {\bf Verbose}  message resource for the Job.  
1329
1330 \item [FullPool=Full]
1331    \index[dir]{FullPool}
1332    specifies to use the Pool named {\bf Full}  if the job is a full backup, or
1333 is
1334 upgraded from another type  to a full backup.  
1335
1336 \item [DifferentialPool=Differential]
1337    \index[dir]{DifferentialPool}
1338    specifies to use the Pool  named {\bf Differential} if the job is a
1339 differential  backup.  
1340
1341 \item [IncrementalPool=Incremental]
1342    \index[dir]{IncrementalPool}
1343    specifies to use the Pool  named {\bf Incremental} if the job is an
1344 incremental  backup.  
1345
1346 \item [SpoolData=yes|no]
1347    \index[dir]{SpoolData}
1348    tells Bacula to request the Storage  daemon to spool data to a disk file
1349 before putting it on  tape.  
1350
1351 \item [WritePartAfterJob=yes|no]
1352    \index[dir]{WritePartAfterJob}
1353    tells Bacula to request the Storage  daemon to write the current part file to
1354    the device when the job  is finished (see 
1355    \ilink{Write Part After Job directive in the Job
1356    resource}{WritePartAfterJob}). Please note, this directive is implemented 
1357    only in version 1.37 and later.
1358
1359 \end{description}
1360
1361 {\bf Date-time-specification} determines when the  Job is to be run. The
1362 specification is a repetition, and as  a default Bacula is set to run a job at
1363 the beginning of the  hour of every hour of every day of every week of every
1364 month  of every year. This is not normally what you want, so you  must specify
1365 or limit when you want the job to run. Any  specification given is assumed to
1366 be repetitive in nature and  will serve to override or limit the default
1367 repetition. This  is done by specifying masks or times for the hour, day of the
1368 month, day of the week, week of the month, week of the year,  and month when
1369 you want the job to run. By specifying one or  more of the above, you can
1370 define a schedule to repeat at  almost any frequency you want.  
1371
1372 Basically, you must supply a {\bf month}, {\bf day}, {\bf hour}, and  {\bf
1373 minute} the Job is to be run. Of these four items to be specified,  {\bf day}
1374 is special in that you may either specify a day of the month  such as 1, 2,
1375 ... 31, or you may specify a day of the week such  as Monday, Tuesday, ...
1376 Sunday. Finally, you may also specify a  week qualifier to restrict the
1377 schedule to the first, second, third,  fourth, or fifth week of the month.  
1378
1379 For example, if you specify only a day of the week, such as {\bf Tuesday}  the
1380 Job will be run every hour of every Tuesday of every Month. That  is the {\bf
1381 month} and {\bf hour} remain set to the defaults of  every month and all
1382 hours.  
1383
1384 Note, by default with no other specification, your job will run  at the
1385 beginning of every hour. If you wish your job to run more than  once in any
1386 given hour, you will need to specify multiple {\bf run}  specifications each
1387 with a different minute.  
1388
1389 The date/time to run the Job can be specified in the following way  in
1390 pseudo-BNF:  
1391
1392 \footnotesize
1393 \begin{verbatim}
1394 <void-keyword>    = on
1395 <at-keyword>      = at
1396 <week-keyword>    = 1st | 2nd | 3rd | 4th | 5th | first |
1397                     second | third | forth | fifth
1398 <wday-keyword>    = sun | mon | tue | wed | thu | fri | sat |
1399                     sunday | monday | tuesday | wednesday |
1400                     thursday | friday | saturday
1401 <week-of-year-keyword> = w00 | w01 | ... w52 | w53
1402 <month-keyword>   = jan | feb | mar | apr | may | jun | jul |
1403                     aug | sep | oct | nov | dec | january |
1404                     february | ... | december
1405 <daily-keyword>   = daily
1406 <weekly-keyword>  = weekly
1407 <monthly-keyword> = monthly
1408 <hourly-keyword>  = hourly
1409 <digit>           = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
1410 <number>          = <digit> | <digit><number>
1411 <12hour>          = 0 | 1 | 2 | ... 12
1412 <hour>            = 0 | 1 | 2 | ... 23
1413 <minute>          = 0 | 1 | 2 | ... 59
1414 <day>             = 1 | 2 | ... 31
1415 <time>            = <hour>:<minute> |
1416                     <12hour>:<minute>am |
1417                     <12hour>:<minute>pm
1418 <time-spec>       = <at-keyword> <time> |
1419                     <hourly-keyword>
1420 <date-keyword>    = <void-keyword>  <weekly-keyword>
1421 <day-range>       = <day>-<day>
1422 <month-range>     = <month-keyword>-<month-keyword>
1423 <wday-range>      = <wday-keyword>-<wday-keyword>
1424 <range>           = <day-range> | <month-range> |
1425                           <wday-range>
1426 <date>            = <date-keyword> | <day> | <range>
1427 <date-spec>       = <date> | <date-spec>
1428 <day-spec>        = <day> | <wday-keyword> |
1429                     <day-range> | <wday-range> |
1430                     <daily-keyword>
1431 <day-spec>        = <day> | <wday-keyword> |
1432                     <day> | <wday-range> |
1433                     <week-keyword> <wday-keyword> |
1434                     <week-keyword> <wday-range>
1435 <month-spec>      = <month-keyword> | <month-range> |
1436                     <monthly-keyword>
1437 <date-time-spec>  = <month-spec> <day-spec> <time-spec>
1438 \end{verbatim}
1439 \normalsize
1440
1441 \end{description}
1442
1443 Note, the Week of Year specification wnn follows the ISO standard definition
1444 of the week of the year, where Week 1 is the week in which the first Thursday
1445 of the year occurs, or alternatively, the week which contains the 4th of
1446 January. Weeks are numbered w01 to w53. w00 for Bacula is the week that
1447 precedes the first ISO week (i.e. has the first few days of the year if any
1448 occur before Thursday). w00 is not defined by the ISO specification. A week
1449 starts with Monday and ends with Sunday. 
1450
1451 An example schedule resource that is named {\bf WeeklyCycle} and runs a job
1452 with level full each Sunday at 1:05am and an incremental job Monday through
1453 Saturday at 1:05am is: 
1454
1455 \footnotesize
1456 \begin{verbatim}
1457 Schedule {
1458   Name = "WeeklyCycle"
1459   Run = Level=Full sun at 1:05
1460   Run = Level=Incremental mon-sat at 1:05
1461 }
1462 \end{verbatim}
1463 \normalsize
1464
1465 An example of a possible monthly cycle is as follows: 
1466
1467 \footnotesize
1468 \begin{verbatim}
1469 Schedule {
1470   Name = "MonthlyCycle"
1471   Run = Level=Full Pool=Monthly 1st sun at 1:05
1472   Run = Level=Differential 2nd-5th sun at 1:05
1473   Run = Level=Incremental Pool=Daily mon-sat at 1:05
1474 }
1475 \end{verbatim}
1476 \normalsize
1477
1478 The first of every month: 
1479
1480 \footnotesize
1481 \begin{verbatim}
1482 Schedule {
1483   Name = "First"
1484   Run = Level=Full on 1 at 1:05
1485   Run = Level=Incremental on 2-31 at 1:05
1486 }
1487 \end{verbatim}
1488 \normalsize
1489
1490 Every 10 minutes: 
1491
1492 \footnotesize
1493 \begin{verbatim}
1494 Schedule {
1495   Name = "TenMinutes"
1496   Run = Level=Full hourly at 0:05
1497   Run = Level=Full hourly at 0:15
1498   Run = Level=Full hourly at 0:25
1499   Run = Level=Full hourly at 0:35
1500   Run = Level=Full hourly at 0:45
1501   Run = Level=Full hourly at 0:55
1502 }
1503 \end{verbatim}
1504 \normalsize
1505
1506 \subsection*{Technical Notes on Schedules}
1507 \index[general]{Schedules!Technical Notes on}
1508 \index[general]{Technical Notes on Schedules}
1509 \addcontentsline{toc}{subsection}{Technical Notes on Schedules}
1510
1511 Internally Bacula keeps a schedule as a bit mask. There are six masks and a
1512 minute field to each schedule. The masks are hour, day of the month (mday),
1513 month, day of the week (wday), week of the month (wom), and week of the year
1514 (woy). The schedule is initialized to have the bits of each of these masks
1515 set, which means that at the beginning of every hour, the job will run. When
1516 you specify a month for the first time, the mask will be cleared and the bit
1517 corresponding to your selected month will be selected. If you specify a second
1518 month, the bit corresponding to it will also be added to the mask. Thus when
1519 Bacula checks the masks to see if the bits are set corresponding to the
1520 current time, your job will run only in the two months you have set. Likewise,
1521 if you set a time (hour), the hour mask will be cleared, and the hour you
1522 specify will be set in the bit mask and the minutes will be stored in the
1523 minute field. 
1524
1525 For any schedule you have defined, you can see how these bits are set by doing
1526 a {\bf show schedules} command in the Console program. Please note that the
1527 bit mask is zero based, and Sunday is the first day of the week (bit zero). 
1528
1529 \input{fileset}
1530
1531 \subsection*{The Client Resource}
1532 \label{ClientResource2}
1533 \index[general]{Resource!Client}
1534 \index[general]{Client Resource}
1535 \addcontentsline{toc}{subsection}{Client Resource}
1536
1537 The Client resource defines the attributes of the Clients that are served by
1538 this Director; that is the machines that are to be backed up. You will need
1539 one Client resource definition for each machine to be backed up. 
1540
1541 \begin{description}
1542
1543 \item [Client (or FileDaemon)]
1544    \index[dir]{Client (or FileDaemon)}
1545    Start of the Client directives.  
1546
1547 \item [Name = \lt{}name\gt{}]
1548    \index[dir]{Name }
1549    The client name which will be used in the  Job resource directive or in the
1550 console run command.  This directive is required.  
1551
1552 \item [Address = \lt{}address\gt{}]
1553    \index[dir]{Address }
1554    Where the address is a host  name, a fully qualified domain name, or a
1555 network
1556 address in  dotted quad notation for a Bacula File server daemon.  This
1557 directive is required. 
1558
1559 \item [FD Port = \lt{}port-number\gt{}]
1560    \index[dir]{FD Port }
1561    Where the port is a port  number at which the Bacula File server daemon can
1562 be
1563 contacted.  The default is 9102. 
1564
1565 \item [Catalog = \lt{}Catalog-resource-name\gt{}]
1566    \index[dir]{Catalog }
1567    This specifies the  name of the catalog resource to be used for this Client. 
1568 This directive is required.  
1569
1570 \item [Password = \lt{}password\gt{}]
1571    \index[dir]{Password }
1572    This is the password to be  used when establishing a connection with the File
1573 services, so  the Client configuration file on the machine to be backed up
1574 must  have the same password defined for this Director. This directive is 
1575 required.  If you have either {\bf /dev/random}  {\bf bc} on your machine,
1576 Bacula will generate a random  password during the configuration process,
1577 otherwise it will  be left blank. 
1578 \label{FileRetention}
1579
1580 \item [File Retention = \lt{}time-period-specification\gt{}]
1581    \index[dir]{File Retention }
1582    The File Retention directive defines the length of time that  Bacula will
1583 keep
1584 File records in the Catalog database.  When this time period expires, and if
1585 {\bf AutoPrune} is set to  {\bf yes} Bacula will prune (remove) File records
1586 that  are older than the specified File Retention period. Note, this  affects
1587 only records in the catalog database. It does not  affect your archive
1588 backups.  
1589
1590 File records  may actually be retained for a shorter period than you specify
1591 on  this directive if you specify either a shorter {\bf Job Retention}  or a
1592 shorter {\bf Volume Retention} period. The shortest  retention period of the
1593 three takes precedence.  The time may be expressed in seconds, minutes, 
1594 hours, days, weeks, months, quarters, or years. See the 
1595 \ilink{ Configuration chapter}{Time} of this  manual for
1596 additional details of time specification. 
1597
1598 The  default is 60 days. 
1599 \label{JobRetention}
1600
1601 \item [Job Retention = \lt{}time-period-specification\gt{}]
1602    \index[dir]{Job Retention }
1603    The Job Retention directive defines the length of time that  Bacula will keep
1604 Job records in the Catalog database.  When this time period expires, and if
1605 {\bf AutoPrune} is set to  {\bf yes} Bacula will prune (remove) Job records
1606 that are  older than the specified File Retention period. As with the other 
1607 retention periods, this affects only records in the catalog and  not data in
1608 your archive backup.  
1609
1610 If a Job record is selected for pruning, all associated File and JobMedia
1611 records will also be pruned regardless of the File Retention period set.
1612 As a consequence, you normally will set the File retention period to be
1613 less than the Job retention period.  The Job retention period can actually
1614 be less than the value you specify here if you set the {\bf Volume
1615 Retention} directive in the Pool resource to a smaller duration.  This is
1616 because the Job retention period and the Volume retention period are
1617 independently applied, so the smaller of the two takes precedence.
1618
1619 The Job retention period is specified as seconds,  minutes, hours, days,
1620 weeks, months,  quarters, or years.  See the 
1621 \ilink{ Configuration chapter}{Time} of this manual for
1622 additional details of  time specification.  
1623
1624 The default is 180 days.  
1625 \label{AutoPrune}
1626
1627 \item [AutoPrune = \lt{}yes|no\gt{}]
1628    \index[dir]{AutoPrune }
1629    If AutoPrune is set to  {\bf yes} (default), Bacula (version 1.20 or greater)
1630 will  automatically apply the File retention period and the Job  retention
1631 period for the Client at the end of the Job.  If you set {\bf AutoPrune = no},
1632 pruning will not be done,  and your Catalog will grow in size each time you
1633 run a Job.  Pruning affects only information in the catalog and not data 
1634 stored in the backup archives (on Volumes).  
1635
1636 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
1637    \index[dir]{Maximum Concurrent Jobs }
1638    where \lt{}number\gt{}  is the maximum number of Jobs with the current Client
1639 that  can run concurrently. Note, this directive limits only Jobs  for Clients
1640 with the same name as the resource in which it appears. Any  other
1641 restrictions on the maximum concurrent jobs such as in  the Director, Job, or
1642 Storage resources will also apply in addition to  any limit specified here.
1643 The  default is set to 1, but you may set it to a larger number.  We strongly
1644 recommend that you read the WARNING documented under  
1645 \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's
1646 resource.  
1647
1648 \item [*Priority = \lt{}number\gt{}]
1649    \index[dir]{*Priority }
1650    The number specifies the  priority of this client relative to other clients
1651 that the  Director is processing simultaneously. The priority can range  from
1652 1 to 1000. The clients are ordered such that the smaller  number priorities
1653 are performed first (not currently  implemented). 
1654 \end{description}
1655
1656 The following is an example of a valid Client resource definition: 
1657
1658 \footnotesize
1659 \begin{verbatim}
1660 Client {
1661   Name = Minimatou
1662   Address = minimatou
1663   Catalog = MySQL
1664   Password = very_good
1665 }
1666 \end{verbatim}
1667 \normalsize
1668
1669 \subsection*{The Storage Resource}
1670 \label{StorageResource2}
1671 \index[general]{Resource!Storage}
1672 \index[general]{Storage Resource}
1673 \addcontentsline{toc}{subsection}{Storage Resource}
1674
1675 The Storage resource defines which Storage daemons are available for use by
1676 the Director. 
1677
1678 \begin{description}
1679
1680 \item [Storage]
1681    \index[dir]{Storage}
1682    Start of the Storage resources. At least one  storage resource must be
1683 specified. 
1684
1685 \item [Name = \lt{}name\gt{}]
1686    \index[dir]{Name }
1687    The name of the storage resource. This  name appears on the Storage directive
1688 specified in the Job directive and  is required. 
1689
1690 \item [Address = \lt{}address\gt{}]
1691    \index[dir]{Address }
1692    Where the address is a host name,  a {\bf fully qualified domain name}, or an
1693 {\bf IP address}. Please note  that the \lt{}address\gt{} as specified here
1694 will be transmitted to  the File daemon who will then use it to contact the
1695 Storage daemon. Hence,  it is {\bf not}, a good idea to use {\bf localhost} as
1696 the  name but rather a fully qualified machine name or an IP address.  This
1697 directive is required. 
1698
1699 \item [SD Port = \lt{}port\gt{}]
1700    \index[dir]{SD Port }
1701    Where port is the port to use to  contact the storage daemon for information
1702 and to start jobs.  This same port number must appear in the Storage resource
1703 of the  Storage daemon's configuration file. The default is 9103. 
1704
1705 \item [Password = \lt{}password\gt{}]
1706    \index[dir]{Password}
1707    This is the password to be used  when establishing a connection with the
1708 Storage services. This  same password also must appear in the Director
1709 resource of the Storage  daemon's configuration file. This directive is
1710 required.  If you have either {\bf /dev/random}  {\bf bc} on your machine,
1711 Bacula will generate a random  password during the configuration process,
1712 otherwise it will  be left blank. 
1713
1714 \item [Device = \lt{}device-name\gt{}]
1715    \index[dir]{Device}
1716    This directive specifies the name of the device to be used for the
1717    storage.  This name is not the physical device name, but the logical
1718    device name as defined on the {\bf Name} directive contained in the {\bf
1719    Device} resource definition of the {\bf Storage daemon} configuration
1720    file or if the device is an Autochanger, you must put the name as
1721    defined on the {\bf Name} directive contained in the {\bf Autochanger
1722    resource definition of the {\bf Storage daemon}.  You can specify any
1723    name you would like (even the device name if you prefer) up to a maximum
1724    of 127 characters in length.  The physical device name associated with
1725    this device is specified in the {\bf Storage daemon} configuration file
1726    (as {\bf Archive Device}).  Please take care not to define two different
1727    Storage resource directives in the Director that point to the same
1728    Device in the Storage daemon.  Doing so may cause the Storage daemon to
1729    block (or hang) attempting to open the same device that is already open.
1730    This directive is required.
1731
1732 \label{MediaType}
1733 \item [Media Type = \lt{}MediaType\gt{}]
1734    \index[dir]{Media Type}
1735    This directive specifies the Media Type to be used to store the data.
1736    This is an arbitrary string of characters up to 127 maximum that you
1737    define.  It can be anything you want.  However, it is best to make it
1738    descriptive of the storage media (e.g.  File, DAT, "HP DLT8000", 8mm,
1739    ...).  In addition, it is essential that you make the {\bf Media Type}
1740    specification unique for each storage media type.  If you have two DDS-4
1741    drives that have incompatible formats, or if you have a DDS-4 drive and
1742    a DDS-4 autochanger, you almost certainly should specify different {\bf
1743    Media Types}.  During a restore, assuming a {\bf DDS-4} Media Type is
1744    associated with the Job, Bacula can decide to use any Storage daemon
1745    that supports Media Type {\bf DDS-4} and on any drive that supports it.
1746
1747    If you want to tie Bacula to using a single Storage daemon or drive, you
1748    must specify a unique Media Type for that drive.  This is an important
1749    point that should be carefully understood.  Note, this applies equally
1750    to Disk Volumes.  If you define more than one disk Device resource in
1751    your Storage daemon's conf file, the Volumes on thoes two devices are in
1752    fact incompatible because one can not be mounted on the other device
1753    since they are found in different directories.  For this reason, you
1754    probably should use two different Media Types for your two disk Devices
1755    (even though you might think of them as both being File types).  You can
1756    find more on this subject in the \ilink{Basic Volume
1757    Management}{_ChapterStart39} chapter of this manual.
1758
1759    The {\bf MediaType} specified here, {\bf must} correspond to the {\bf
1760    Media Type} specified in the {\bf Device} resource of the {\bf Storage
1761    daemon} configuration file.  This directive is required, and it is used
1762    by the Director and the Storage daemon to ensure that a Volume
1763    automatically selected from the Pool corresponds to the physical device.
1764    If a Storage daemon handles multiple devices (e.g.  will write to
1765    various file Volumes on different partitions), this directive allows you
1766    to specify exactly which device.
1767
1768    As mentioned above, the value specified in the Director's Storage  resource
1769    must agree with the value specified in the Device resource in  the {\bf
1770    Storage daemon's} configuration file. It is also an  additional check so  that
1771    you don't try to write data for a DLT onto an 8mm device. 
1772
1773 \label{Autochanger1}
1774 \item [Autochanger = \lt{}yes|no\gt{}]  
1775    \index[dir]{Autochanger }
1776    If you specify {\bf yes}  for this command (the default is {\bf no}), when
1777    you use the {\bf label} command or the {\bf add} command to create a new
1778    Volume, {\bf Bacula} will also request the Autochanger Slot number.
1779    This simplifies creating database entries for Volumes in an autochanger.
1780    If you forget to specify the Slot, the autochanger will not be used.
1781    However, you may modify the Slot associated with a Volume at any time by
1782    using the {\bf update volume} command in the console program.  When {\bf
1783    autochanger} is enabled, the algorithm used by Bacula to search for
1784    available volumes will be modified to consider only Volumes that are
1785    known to be in the autochanger's magazine.  If no {\bf in changer}
1786    volume is found, Bacula will attempt recycling, pruning, ..., and if
1787    still no volume is found, Bacula will search for any volume whether or
1788    not in the magazine.  By privileging in changer volumes, this procedure
1789    minimizes operator intervention.  The default is {\bf no}.
1790
1791    For the autochanger to be used, you must also specify {\bf Autochanger =
1792    yes} in the \ilink{Device Resource}{Autochanger} in the Storage daemon's
1793    configuration file as well as other important Storage daemon
1794    configuration information.  Please consult the \ilink{Using
1795    Autochangers}{_ChapterStart18} manual of this chapter for the details of
1796    using autochangers.
1797
1798 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
1799    \index[dir]{Maximum Concurrent Jobs }
1800    where \lt{}number\gt{}  is the maximum number of Jobs with the current
1801 Storage
1802 resource that  can run concurrently. Note, this directive limits only Jobs 
1803 for Jobs using this Storage daemon. Any  other restrictions on the maximum
1804 concurrent jobs such as in  the Director, Job, or Client resources will also
1805 apply in addition to  any limit specified here. The  default is set to 1, but
1806 you may set it to a larger number.  We strongly recommend that you read the
1807 WARNING documented under  
1808 \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's
1809 resource.  
1810
1811 While it is possible to set the Director's, Job's, or Client's  maximum
1812 concurrent jobs greater than one, you should take great  care in setting the
1813 Storage daemon's greater than one. By keeping  this directive set to one, you
1814 will avoid having two jobs simultaneously  write to the same Volume. Although
1815 this is supported, it is not  currently recommended.  
1816 \end{description}
1817
1818 The following is an example of a valid Storage resource definition: 
1819
1820 \footnotesize
1821 \begin{verbatim}
1822 # Definition of tape storage device
1823 Storage {
1824   Name = DLTDrive
1825   Address = lpmatou
1826   Password = storage_password # password for Storage daemon
1827   Device = "HP DLT 80"    # same as Device in Storage daemon
1828   Media Type = DLT8000    # same as MediaType in Storage daemon
1829 }
1830 \end{verbatim}
1831 \normalsize
1832
1833 \subsection*{The Pool Resource}
1834 \label{PoolResource}
1835 \index[general]{Resource!Pool}
1836 \index[general]{Pool Resource}
1837 \addcontentsline{toc}{subsection}{Pool Resource}
1838
1839 The Pool resource defines the set of storage Volumes (tapes or files) to be
1840 used by Bacula to write the data. By configuring different Pools, you can
1841 determine which set of Volumes (media) receives the backup data. This permits,
1842 for example, to store all full backup data on one set of Volumes and all
1843 incremental backups on another set of Volumes. Alternatively, you could assign
1844 a different set of Volumes to each machine that you backup. This is most
1845 easily done by defining multiple Pools. 
1846
1847 Another important aspect of a Pool is that it contains the default attributes
1848 (Maximum Jobs, Retention Period, Recycle flag, ...) that will be given to a
1849 Volume when it is created. This avoids the need for you to answer a large
1850 number of questions when labeling a new Volume. Each of these attributes can
1851 later be changed on a Volume by Volume basis using the {\bf update} command in
1852 the console program. Note that you must explicitly specify which Pool Bacula
1853 is to use with each Job. Bacula will not automatically search for the correct
1854 Pool. 
1855
1856 Most often in Bacula installations all backups for all machines (Clients) go
1857 to a single set of Volumes. In this case, you will probably only use the {\bf
1858 Default} Pool. If your backup strategy calls for you to mount a different tape
1859 each day, you will probably want to define a separate Pool for each day. For
1860 more information on this subject, please see the 
1861 \ilink{Backup Strategies}{_ChapterStart3} chapter of this
1862 manual. 
1863
1864
1865 To use a Pool, there are three distinct steps. First the Pool must be defined
1866 in the Director's configuration file. Then the Pool must be written to the
1867 Catalog database. This is done automatically by the Director each time that it
1868 starts, or alternatively can be done using the {\bf create} command in the
1869 console program. Finally, if you change the Pool definition in the Director's
1870 configuration file and restart Bacula, the pool will be updated alternatively
1871 you can use the {\bf update pool} console command to refresh the database
1872 image. It is this database image rather than the Director's resource image
1873 that is used for the default Volume attributes. Note, for the pool to be
1874 automatically created or updated, it must be explicitly referenced by a Job
1875 resource. 
1876
1877 Next the physical media must be labeled. The labeling can either be done with
1878 the {\bf label} command in the {\bf console} program or using the {\bf btape}
1879 program. The preferred method is to use the {\bf label} command in the {\bf
1880 console} program. 
1881
1882 Finally, you must add Volume names (and their attributes) to the Pool. For
1883 Volumes to be used by Bacula they must be of the same {\bf Media Type} as the
1884 archive device specified for the job (i.e. if you are going to back up to a
1885 DLT device, the Pool must have DLT volumes defined since 8mm volumes cannot be
1886 mounted on a DLT drive). The {\bf Media Type} has particular importance if you
1887 are backing up to files. When running a Job, you must explicitly specify which
1888 Pool to use. Bacula will then automatically select the next Volume to use from
1889 the Pool, but it will ensure that the {\bf Media Type} of any Volume selected
1890 from the Pool is identical to that required by the Storage resource you have
1891 specified for the Job. 
1892
1893 If you use the {\bf label} command in the console program to label the
1894 Volumes, they will automatically be added to the Pool, so this last step is
1895 not normally required. 
1896
1897 It is also possible to add Volumes to the database without explicitly labeling
1898 the physical volume. This is done with the {\bf add} console command. 
1899
1900 As previously mentioned, each time Bacula starts, it scans all the Pools
1901 associated with each Catalog, and if the database record does not already
1902 exist, it will be created from the Pool Resource definition. {\bf Bacula}
1903 probably should do an {\bf update pool} if you change the Pool definition, but
1904 currently, you must do this manually using the {\bf update pool} command in
1905 the Console program. 
1906
1907 The Pool Resource defined in the Director's configuration file
1908 (bacula-dir.conf) may contain the following directives: 
1909
1910 \begin{description}
1911
1912 \item [Pool]
1913    \index[dir]{Pool}
1914    Start of the Pool resource. There must  be at least one Pool resource
1915 defined.
1916
1917
1918 \item [Name = \lt{}name\gt{}]
1919    \index[dir]{Name }
1920    The name of the pool.  For most applications, you will use the default pool 
1921 name {\bf Default}. This directive is required.  
1922
1923 \item [Number of Volumes = \lt{}number\gt{}]
1924    \index[dir]{Number of Volumes }
1925    This directive specifies  the number of volumes (tapes or files) contained in
1926 the pool.  Normally, it is defined and updated automatically by the  Bacula
1927 catalog handling routines. 
1928 \label{MaxVolumes}
1929
1930 \item [Maximum Volumes = \lt{}number\gt{}]
1931    \index[dir]{Maximum Volumes }
1932    This directive specifies the  maximum number of volumes (tapes or files)
1933 contained in the pool.  This directive is optional, if omitted or set to zero,
1934 any number  of volumes will be permitted. In general, this directive is useful
1935 for Autochangers where there is a fixed number of Volumes, or  for File
1936 storage where you wish to ensure that the backups made to  disk files do not
1937 become too numerous or consume too much space.  
1938
1939 \item [Pool Type = \lt{}type\gt{}]
1940    \index[dir]{Pool Type }
1941    This directive defines the pool  type, which corresponds to the type of Job
1942 being run. It is  required and may be one of the following:  
1943
1944 \begin{itemize}
1945 \item [Backup]  
1946 \item [*Archive]  
1947 \item [*Cloned]  
1948 \item [*Migration]  
1949 \item [*Copy]  
1950 \item [*Save]  
1951    \end{itemize}
1952
1953 \item [Use Volume Once = \lt{}yes|no\gt{}]
1954    \index[dir]{Use Volume Once }
1955    This directive  if set to {\bf yes} specifies that each volume is to be  used
1956 only once. This is most useful when the Media is a  file and you want a new
1957 file for each backup that is  done. The default is {\bf no} (i.e. use volume
1958 any  number of times). This directive will most likely be phased out 
1959 (deprecated), so you are recommended to use {\bf Maximum Volume Jobs = 1} 
1960 instead.  
1961
1962 Please note that the value defined by this directive in the  bacula-dir.conf
1963 file is the default value used when a Volume  is created. Once the volume is
1964 created, changing the value  in the bacula-dir.conf file will not change what
1965 is stored  for the Volume. To change the value for an existing Volume  you
1966 must use the {\bf update} command in the Console.  
1967
1968 \item [Maximum Volume Jobs = \lt{}positive-integer\gt{}]
1969    \index[dir]{Maximum Volume Jobs }
1970    This directive specifies  the maximum number of Jobs that can be written to
1971 the Volume. If  you specify zero (the default), there is no limit. Otherwise, 
1972 when the number of Jobs backed up to the Volume equals {\bf positive-integer} 
1973 the Volume will be marked {\bf Used}. When the Volume is marked  {\bf Used} it
1974 can no longer be used for appending Jobs, much like  the {\bf Full} status but
1975 it can be recycled if recycling is enabled, and thus used again.
1976 By setting {\bf
1977 MaximumVolumeJobs} to one, you get the same  effect as setting {\bf
1978 UseVolumeOnce = yes}.
1979
1980 Please note that the value defined by this directive in the  bacula-dir.conf
1981 file is the default value used when a Volume  is created. Once the volume is
1982 created, changing the value  in the bacula-dir.conf file will not change what
1983 is stored  for the Volume. To change the value for an existing Volume  you
1984 must use the {\bf update} command in the Console.  
1985
1986 \item [Maximum Volume Files = \lt{}positive-integer\gt{}]
1987    \index[dir]{Maximum Volume Files }
1988    This directive specifies  the maximum number of files that can be written to
1989 the Volume. If  you specify zero (the default), there is no limit. Otherwise, 
1990 when the number of files written to the Volume equals {\bf positive-integer} 
1991 the Volume will be marked {\bf Used}. When the Volume is marked  {\bf Used} it
1992 can no longer be used for appending Jobs, much like  the {\bf Full} status but
1993 it can be recycled if recycling is enabled and thus used again.
1994 This value is checked and the
1995 {\bf Used} status is set only  at the end of a job that writes to the
1996 particular volume.  
1997
1998 Please note that the value defined by this directive in the  bacula-dir.conf
1999 file is the default value used when a Volume  is created. Once the volume is
2000 created, changing the value  in the bacula-dir.conf file will not change what
2001 is stored  for the Volume. To change the value for an existing Volume  you
2002 must use the {\bf update} command in the Console.  
2003
2004 \item [Maximum Volume Bytes = \lt{}size\gt{}]
2005    \index[dir]{Maximum Volume Bytes }
2006    This directive specifies  the maximum number of bytes that can be written to
2007 the Volume. If  you specify zero (the default), there is no limit except the 
2008 physical size of the Volume. Otherwise,  when the number of bytes written to
2009 the Volume equals {\bf size}  the Volume will be marked {\bf Used}. When the
2010 Volume is marked  {\bf Used} it can no longer be used for appending Jobs, much
2011 like  the {\bf Full} status but it can be recycled if recycling is enabled,
2012 and thus the Volume can be re-used after recycling.
2013 This value is checked and the {\bf Used} status set while  the job is writing
2014 to the particular volume.  
2015
2016 Please note that the value defined by this directive in the  bacula-dir.conf
2017 file is the default value used when a Volume  is created. Once the volume is
2018 created, changing the value  in the bacula-dir.conf file will not change what
2019 is stored  for the Volume. To change the value for an existing Volume  you
2020 must use the {\bf update} command in the Console.  
2021
2022 \item [Volume Use Duration = \lt{}time-period-specification\gt{}]
2023    \index[dir]{Volume Use Duration }
2024    The Volume Use Duration directive defines the time period that the
2025    Volume can be written beginning from the time of first data write to the
2026    Volume.  If the time-period specified is zero (the default), the Volume
2027    can be written indefinitely.  Otherwise, when the time period from the
2028    first write to the volume (the first Job written) exceeds the
2029    time-period-specification, the Volume will be marked {\bf Used}, which
2030    means that no more Jobs can be appended to the Volume, but it may be
2031    recycled if recycling is enabled.  Once the Volume is
2032    recycled, it will be available for use again.
2033    
2034    You might use this directive, for example, if you have a Volume used for
2035    Incremental backups, and Volumes used for Weekly Full backups.  Once the
2036    Full backup is done, you will want to use a different Incremental
2037    Volume.  This can be accomplished by setting the Volume Use Duration for
2038    the Incremental Volume to six days.  I.e.  it will be used for the 6
2039    days following a Full save, then a different Incremental volume will be
2040    used.  Be careful about setting the duration to short periods such as 23
2041    hours, or you might experience problems of Bacula waiting for a tape
2042    over the weekend only to complete the backups Monday morning when an
2043    operator mounts a new tape.
2044    
2045    The use duration is checked and the {\bf Used} status is set only at the
2046    end of a job that writes to the particular volume, which means that even
2047    though the use duration may have expired, the catalog entry will not be
2048    updated until the next job that uses this volume is run.
2049    
2050    Please note that the value defined by this directive in the  bacula-dir.conf
2051    file is the default value used when a Volume  is created. Once the volume is
2052    created, changing the value  in the bacula-dir.conf file will not change what
2053    is stored  for the Volume. To change the value for an existing Volume  you
2054    must use the 
2055    \ilink{\bf update volume}{UpdateCommand} command in the Console.  
2056
2057 \item [Catalog Files = \lt{}yes|no\gt{}]
2058    \index[dir]{Catalog Files }
2059    This directive defines whether or not you want the names of the files
2060    that were saved to be put into the catalog.  The default is {\bf yes}.
2061    The advantage of specifying {\bf Catalog Files = No} is that you will
2062    have a significantly smaller Catalog database.  The disadvantage is that
2063    you will not be able to produce a Catalog listing of the files backed up
2064    for each Job (this is often called Browsing).  Also, without the File
2065    entries in the catalog, you will not be able to use the Console {\bf
2066    restore} command nor any other command that references File entries.
2067    
2068 \label{PoolAutoPrune}
2069 \item [AutoPrune = \lt{}yes|no\gt{}]
2070    \index[dir]{AutoPrune }
2071    If AutoPrune is set to  {\bf yes} (default), Bacula (version 1.20 or greater)
2072    will  automatically apply the Volume Retention period when new Volume  is
2073    needed and no appendable Volumes exist in the Pool. Volume  pruning causes
2074    expired Jobs (older than the {\bf Volume  Retention} period) to be deleted
2075    from the Catalog and permits  possible recycling of the Volume.  
2076    
2077 \label{VolRetention}
2078 \item [Volume Retention = \lt{}time-period-specification\gt{}]
2079    \index[dir]{Volume Retention }
2080    The Volume Retention directive defines the length of time that {\bf
2081    Bacula} will keep Job records associated with the Volume in the Catalog
2082    database.  When this time period expires, and if {\bf AutoPrune} is set
2083    to {\bf yes} Bacula may prune (remove) Job records that are older than
2084    the specified Volume Retention period if it is necessary to free up a
2085    Volume.  Recycling will not occur until it is absolutely necessary to
2086    free up a volume.  All File records associated with pruned Jobs are also
2087    pruned.  The time may be specified as seconds, minutes, hours, days,
2088    weeks, months, quarters, or years.  The {\bf Volume Retention} is
2089    applied independently of the {\bf Job Retention} and the {\bf File
2090    Retention} periods defined in the Client resource.  This means that all
2091    the retentions periods are applied in turn and that the shorter period
2092    is the one that effectively takes precedence.  Note, that when the {\bf
2093    Volume Retention} period has been reached, and it is necessary to obtain
2094    a new volume, Bacula will prune both the Job and the File records.
2095
2096    It is important to know that when the Volume Retention period expires, 
2097    Bacula does not automatically recycle a Volume. It attempts to keep the
2098    Volume data intact as long as possible before over writing the Volume.
2099    
2100    The default Volume retention period is 365 days.  Note, this directive
2101    sets the default value for each Volume entry in the Catalog when the
2102    Volume is created.  The value in the catalog may be later individually
2103    changed for each Volume using the Console program.
2104    
2105    By defining multiple Pools with different Volume Retention periods, you
2106    may effectively have a set of tapes that is recycled weekly, another
2107    Pool of tapes that is recycled monthly and so on.  However, one must
2108    keep in mind that if your {\bf Volume Retention} period is too short, it
2109    may prune the last valid Full backup, and hence until the next Full
2110    backup is done, you will not have a complete backup of your system, and
2111    in addition, the next Incremental or Differential backup will be
2112    promoted to a Full backup.  As a consequence, the minimum {\bf Volume
2113    Retention} period should be at twice the interval of your Full backups.
2114    This means that if you do a Full backup once a month, the minimum Volume
2115    retention period should be two months.
2116    
2117    Please note that the value defined by this directive in the  bacula-dir.conf
2118    file is the default value used when a Volume  is created. Once the volume is
2119    created, changing the value  in the bacula-dir.conf file will not change what
2120    is stored  for the Volume. To change the value for an existing Volume  you
2121    must use the {\bf update} command in the Console.
2122    
2123 \label{PoolRecycle}
2124 \item [Recycle = \lt{}yes|no\gt{}]
2125    \index[dir]{Recycle }
2126    This directive specifies whether or not Purged Volumes will be recycled.
2127    If it is set to {\bf yes} (default) and Bacula needs a volume but finds
2128    none that are appendable, it will search for and recycle (reuse) Purged
2129    Volumes (i.e.  volumes with all the Jobs and Files expired and thus
2130    deleted from the Catalog).  If the Volume is recycled, all previous data
2131    written to that Volume will be overwritten. If Recycle is set to {\bf
2132    no} you must manually set the recycle flag (update command) for
2133    a Volume to be reused.
2134
2135    Please note that the value defined by this directive in the
2136    bacula-dir.conf file is the default value used when a Volume is created.
2137    Once the volume is created, changing the value in the bacula-dir.conf
2138    file will not change what is stored for the Volume.  To change the value
2139    for an existing Volume you must use the {\bf update} command in the
2140    Console.
2141
2142 \label{RecycleOldest}
2143 \item [Recycle Oldest Volume = \lt{}yes|no\gt{}]
2144    \index[dir]{Recycle Oldest Volume }
2145    This directive instructs the Director to search for the oldest used
2146    Volume in the Pool when another Volume is requested by the Storage
2147    daemon and none are available.  The catalog is then {\bf pruned}
2148    respecting the retention periods of all Files and Jobs written to this
2149    Volume.  If all Jobs are pruned (i.e. the volume is Purged), then the
2150    Volume is recycled and will be used as the next Volume to be written.
2151    This directive respects any Job, File, or Volume retention periods that
2152    you may have specified, and as such it is {\bf much} better to use this
2153    directive than the Purge Oldest Volume.
2154
2155    This directive can be useful if you have a fixed number of Volumes in the
2156    Pool and you want to cycle through them and you have specified the correct
2157    retention periods.  
2158
2159    However, if you use this directive and have only one
2160    Volume in the Pool, you will immediately recycle your Volume if you fill
2161    it and Bacula needs another one. Thus your backup will be totally invalid.
2162    Please use this directive with care. The default is {\no}.
2163
2164 \label{RecycleCurrent}
2165
2166 \item [Recycle Current Volume = \lt{}yes|no\gt{}]
2167    \index[dir]{Recycle Current Volume }
2168    If Bacula needs a new Volume, this directive instructs Bacula to Prune
2169    the volume respecting the Job and File retention periods.  If all Jobs
2170    are pruned (i.e.  the volume is Purged), then the Volume is recycled and
2171    will be used as the next Volume to be written.  This directive respects
2172    any Job, File, or Volume retention periods that you may have specified,
2173    and thus it is {\bf much} better to use it rather than the Purge Oldest
2174    Volume directive.
2175
2176    This directive can be useful if you have: a fixed number of Volumes in
2177    the Pool, you want to cycle through them, and you have specified
2178    retention periods that prune Volumes before you have cycled through the
2179    Volume in the Pool.
2180
2181    However, if you use this directive and have only one Volume in the Pool,
2182    you will immediately recycle your Volume if you fill it and Bacula needs
2183    another one.  Thus your backup will be totally invalid.  Please use this
2184    directive with care.  The default is {\no}.
2185
2186 \label{PurgeOldest}
2187
2188 \item [Purge Oldest Volume = \lt{}yes|no\gt{}]
2189    \index[dir]{Purge Oldest Volume }
2190    This directive instructs the Director to search for the oldest used
2191    Volume in the Pool when another Volume is requested by the Storage
2192    daemon and none are available.  The catalog is then {\bf purged}
2193    irrespective of retention periods of all Files and Jobs written to this
2194    Volume.  The Volume is then recycled and will be used as the next Volume
2195    to be written.  This directive overrides any Job, File, or Volume
2196    retention periods that you may have specified.
2197
2198    This directive can be useful if you have a fixed number of Volumes in
2199    the Pool and you want to cycle through them and reusing the oldest one
2200    when all Volumes are full, but you don't want to worry about setting
2201    proper retention periods.  However, by using this option you risk losing
2202    valuable data.
2203
2204    Please be aware that {\bf Purge Oldest Volume} disregards all retention
2205    periods. If you have only a single Volume defined and you turn this
2206    variable on, that Volume will always be immediately overwritten when it
2207    fills!  So at a minimum, ensure that you have a decent number of Volumes
2208    in your Pool before running any jobs.  If you want retention periods to
2209    apply do not use this directive.  To specify a retention period, use the
2210    {\bf Volume Retention} directive (see above).
2211
2212    We {\bf highly} recommend against using this directive, because it is
2213    sure that some day, Bacula will recycle a Volume that contains current
2214    data.  The default is {\no}.
2215
2216 \item [Cleaning Prefix = \lt{}string\gt{}]
2217    \index[dir]{Cleaning Prefix }
2218    This directive defines a prefix string, which if it matches the
2219    beginning of a Volume name during labeling of a Volume, the Volume will
2220    be defined with the VolStatus set to {\bf Cleaning} and thus Bacula will
2221    never attempt to use this tape.  This is primarily for use with
2222    autochangers that accept barcodes where the convention is that barcodes
2223    beginning with {\bf CLN} are treated as cleaning tapes.
2224
2225 \label{Label}
2226 \item [Label Format = \lt{}format\gt{}]
2227    \index[dir]{Label Format }
2228    This directive specifies the format of the labels contained in this
2229    pool.  The format directive is used as a sort of template to create new
2230    Volume names during automatic Volume labeling.
2231
2232    The {\bf format} should be specified in double quotes, and consists of
2233    letters, numbers and the special characters hyphen ({\bf -}), underscore
2234    ({\bf \_}), colon ({\bf :}), and period ({\bf .}), which are the legal
2235    characters for a Volume name.  The {\bf format} should be enclosed in
2236    double quotes (").
2237
2238    In addition, the format may contain a number of variable expansion
2239    characters which will be expanded by a complex algorithm allowing you to
2240    create Volume names of many different formats.  In all cases, the
2241    expansion process must resolve to the set of characters noted above that
2242    are legal Volume names.  Generally, these variable expansion characters
2243    begin with a dollar sign ({\bf \$}) or a left bracket ({\bf [}).  If you
2244    specify variable expansion characters, you should always enclose the
2245    format with double quote characters ({\bf "}).  For more details on
2246    variable expansion, please see the \ilink{Variable
2247    Expansion}{_ChapterStart50} Chapter of this manual.
2248
2249    If no variable expansion characters are found in the string, the Volume
2250    name will be formed from the {\bf format} string appended with the
2251    number of volumes in the pool plus one, which will be edited as four
2252    digits with leading zeros.  For example, with a {\bf Label Format =
2253    "File-"}, the first volumes will be named {\bf File-0001}, {\bf
2254    File-0002}, ...
2255
2256    With the exception of Job specific variables, you can test your {\bf
2257    LabelFormat} by using the \ilink{ var command}{var} the Console Chapter
2258    of this manual.
2259
2260    In almost all cases, you should enclose the format specification (part
2261    after the equal sign) in double quotes.  Please note that this directive
2262    is deprecated and is replaced in version 1.37 and greater with a Python
2263    script for creating volume names.
2264
2265 \end{description}
2266
2267 In order for a Pool to be used during a Backup Job, the Pool must have at
2268 least one Volume associated with it.  Volumes are created for a Pool using
2269 the {\bf label} or the {\bf add} commands in the {\bf Bacula Console},
2270 program.  In addition to adding Volumes to the Pool (i.e.  putting the
2271 Volume names in the Catalog database), the physical Volume must be labeled
2272 with a valid Bacula software volume label before {\bf Bacula} will accept
2273 the Volume.  This will be automatically done if you use the {\bf label}
2274 command.  Bacula can automatically label Volumes if instructed to do so,
2275 but this feature is not yet fully implemented.
2276
2277 The following is an example of a valid Pool resource definition: 
2278
2279 \footnotesize
2280 \begin{verbatim}
2281  
2282 Pool {
2283   Name = Default
2284   Pool Type = Backup
2285 }
2286 \end{verbatim}
2287 \normalsize
2288
2289 \subsubsection*{The Scratch Pool}
2290 \addcontentsline{toc}{subsection}{Scratch Pool}
2291 \index[general]{Scratch Pool}
2292 In general, you can give your Pools any name you wish, but there is one 
2293 important restriction: the Pool named {\bf Scratch}, if it exists behaves 
2294 like a scratch pool of Volumes in that when Bacula needs a new Volume for 
2295 writing and it cannot find one, it will look in the Scratch pool, and if
2296 it finds an available Volume, it will move it out of the Scratch pool into
2297 the Pool currently being used by the job.
2298
2299
2300 \subsection*{The Catalog Resource}
2301 \label{CatalogResource}
2302 \index[general]{Resource!Catalog}
2303 \index[general]{Catalog Resource}
2304 \addcontentsline{toc}{subsection}{Catalog Resource}
2305
2306 The Catalog Resource defines what catalog to use for the current job.
2307 Currently, Bacula can only handle a single database server (SQLite, MySQL,
2308 PostgreSQL) that is defined when configuring {\bf Bacula}.  However, there
2309 may be as many Catalogs (databases) defined as you wish.  For example, you
2310 may want each Client to have its own Catalog database, or you may want
2311 backup jobs to use one database and verify or restore jobs to use another
2312 database.
2313
2314 \begin{description}
2315
2316 \item [Catalog]
2317    \index[dir]{Catalog}
2318    Start of the Catalog resource.  At least one Catalog resource must be
2319 defined.
2320
2321
2322 \item [Name = \lt{}name\gt{}]
2323    \index[dir]{Name }
2324    The name of the Catalog. No  necessary relation to the database server name.
2325 This name  will be specified in the Client resource directive indicating  that
2326 all catalog data for that Client is maintained in this  Catalog. This
2327 directive is required.  
2328
2329 \item [password = \lt{}password\gt{}]
2330    \index[dir]{password }
2331    This specifies the password  to use when logging into the database. This
2332 directive is required.  
2333
2334 \item [DB Name = \lt{}name\gt{}]
2335    \index[dir]{DB Name }
2336    This specifies the name of the  database. If you use multiple catalogs
2337 (databases), you specify  which one here. If you are using an external
2338 database server  rather than the internal one, you must specify a name that 
2339 is known to the server (i.e. you explicitly created the  Bacula tables using
2340 this name. This directive is  required. 
2341
2342 \item [user = \lt{}user\gt{}]
2343    \index[dir]{user }
2344    This specifies what user name  to use to log into the database. This
2345 directive
2346 is required.  
2347
2348 \item [DB Socket = \lt{}socket-name\gt{}]
2349    \index[dir]{DB Socket }
2350    This is the name of  a socket to use on the local host to connect to the
2351 database.  This directive is used only by MySQL and is ignored by  SQLite.
2352 Normally, if neither {\bf DB Socket} or {\bf DB Address}  are specified, MySQL
2353 will use the default socket.  
2354
2355 \item [DB Address = \lt{}address\gt{}]
2356    \index[dir]{DB Address }
2357    This is the host address  of the database server. Normally, you would specify
2358 this instead  of {\bf DB Socket} if the database server is on another machine.
2359 In that case, you will also specify {\bf DB Port}. This directive  is used
2360 only by MySQL and is ignored by SQLite if provided.  This directive is
2361 optional.  
2362
2363 \item [DB Port = \lt{}port\gt{}]
2364    \index[dir]{DB Port }
2365    This defines the port to  be used in conjunction with {\bf DB Address} to
2366 access the  database if it is on another machine. This directive is used  only
2367 by MySQL and is ignored by SQLite if provided. This  directive is optional.  
2368
2369 %% \item [Multiple Connections = \lt{}yes|no\gt{}]
2370 %% \index[dir]{Multiple Connections }
2371 %% By default, this  directive is set to no. In that case, each job that uses
2372 the
2373 %% same Catalog will use a single connection to the catalog. It will  be shared,
2374 %% and Bacula will allow only one Job at a time to  communicate. If you set this
2375 %% directive to yes, Bacula will  permit multiple connections to the database,
2376 %% and the database  must be multi-thread capable. For SQLite and PostgreSQL,
2377 %% this is  no problem. For MySQL, you must be *very* careful to have the 
2378 %% multi-thread version of the client library loaded on your system.  When this
2379 %% directive is set yes, each Job will have a separate  connection to the
2380 %% database, and the database will control the  interaction between the
2381 different
2382 %% Jobs. This can significantly  speed up the database operations if you are
2383 %% running multiple  simultaneous jobs. In addition, for SQLite and PostgreSQL,
2384 %% Bacula  will automatically enable transactions. This can significantly  speed
2385 %% up insertion of attributes in the database either for  a single Job or
2386 %% multiple simultaneous Jobs.  
2387
2388 %% This directive has not been tested. Please test carefully  before running it
2389 %% in production and report back your results.  
2390
2391 \end{description}
2392
2393 The following is an example of a valid Catalog resource definition: 
2394
2395 \footnotesize
2396 \begin{verbatim}
2397 Catalog
2398 {
2399   Name = SQLite
2400   dbname = bacula;
2401   user = bacula;
2402   password = ""                       # no password = no security
2403 }
2404 \end{verbatim}
2405 \normalsize
2406
2407 or for a Catalog on another machine: 
2408
2409 \footnotesize
2410 \begin{verbatim}
2411 Catalog
2412 {
2413   Name = MySQL
2414   dbname = bacula
2415   user = bacula
2416   password = ""
2417   DB Address = remote.acme.com
2418   DB Port = 1234
2419 }
2420 \end{verbatim}
2421 \normalsize
2422
2423 \subsection*{The Messages Resource}
2424 \label{MessagesResource2}
2425 \index[general]{Resource!Messages}
2426 \index[general]{Messages Resource}
2427 \addcontentsline{toc}{subsection}{Messages Resource}
2428
2429 For the details of the Messages Resource, please see the 
2430 \ilink{Messages Resource Chapter}{_ChapterStart15} of this
2431 manual. 
2432
2433 \subsection*{The Console Resource}
2434 \label{ConsoleResource1}
2435 \index[general]{Console Resource}
2436 \index[general]{Resource!Console}
2437 \addcontentsline{toc}{subsection}{Console Resource}
2438
2439 As of Bacula version 1.33 and higher, there are three different kinds of
2440 consoles, which the administrator or user can use to interact with the
2441 Director. These three kinds of consoles comprise three different security
2442 levels. 
2443
2444 \begin{itemize}
2445 \item The first console type is an {\bf anonymous} or {\bf default}  console,
2446    which has full privileges.  There is no console resource necessary for
2447    this type since the password is specified in the Director's resource and
2448    consequently such consoles do not have a name as defined on a {\bf Name
2449    =} directive.  This is the kind of console that was initially
2450    implemented in versions prior to 1.33 and remains valid.  Typically you
2451    would use it only for  administrators.  
2452
2453 \item The second type of console, and new to version 1.33 and  higher is a
2454    "named" console defined within a Console resource in both the Director's
2455    configuration file and in the Console's configuration file.  Both the
2456    names and the passwords in these two entries must match much as is the
2457    case for Client programs.
2458
2459    This second type of console begins with absolutely no privileges except
2460    those explicitly specified in the Director's Console resource.  Thus you
2461    can have multiple Consoles with different names and passwords, sort of
2462    like multiple users, each with different privileges.  As a default,
2463    these consoles can do absolutely nothing -- no commands whatsoever.  You
2464    give them privileges or rather access to commands and resources by
2465    specifying access control lists in the Director's Console resource.  The
2466    ACLs are specified by a directive followed by a list of access names.
2467    Examples of this are shown below.
2468
2469 \item The third type of console is similar to the above mentioned  one in that
2470    it requires a Console resource definition in both the Director and the
2471    Console.  In addition, if the console name, provided on the {\bf Name =}
2472    directive, is the same as a Client name, that console is permitted to
2473    use the {\bf SetIP} command to change the Address directive in the
2474    Director's client resource to the IP address of the Console.  This
2475    permits portables or other machines using DHCP (non-fixed IP addresses)
2476    to "notify" the Director of their current IP address.
2477 \end{itemize}
2478
2479 The Console resource is optional and need not be specified. The following
2480 directives are permitted within the Director's configuration resource: 
2481
2482 \begin{description}
2483
2484 \item [Name = \lt{}name\gt{}]
2485    \index[dir]{Name }
2486    The name of the console. This  name must match the name specified in the
2487 Console's configuration  resource (much as is the case with Client
2488 definitions).  
2489
2490 \item [Password = \lt{}password\gt{}]
2491    \index[dir]{Password }
2492    Specifies the password that must be supplied for a named Bacula Console
2493    to be authorized.  The same password must appear in the {\bf Console}
2494    resource of the Console configuration file.  For added security, the
2495    password is never actually passed across the network but rather a
2496    challenge response hash code created with the password.  This directive
2497    is required.  If you have either {\bf /dev/random} {\bf bc} on your
2498    machine, Bacula will generate a random password during the configuration
2499    process, otherwise it will be left blank.
2500
2501 \item [JobACL = \lt{}name-list\gt{}]
2502    \index[dir]{JobACL }
2503    This directive is used to specify a list of Job resource names that can
2504    be accessed by the console.  Without this directive, the console cannot
2505    access any of the Director's Job resources.  Multiple Job resource names
2506    may be specified by separating them with commas, and/or by specifying
2507    multiple JobACL directives.  For example, the directive may be specified
2508    as:
2509
2510 \footnotesize
2511 \begin{verbatim}
2512     JobACL = kernsave, "Backup client 1", "Backup client 2"
2513     JobACL = "RestoreFiles"
2514     
2515 \end{verbatim}
2516 \normalsize
2517
2518 With the above specification, the console can access the Director's  resources
2519 for the four jobs named on the JobACL directives,  but for no others.  
2520
2521 \item [ClientACL = \lt{}name-list\gt{}]
2522    \index[dir]{ClientACL }
2523    This directive is used to  specify a list of Client resource names that can
2524 be
2525 accessed by  the console.  
2526
2527 \item [StorageACL = \lt{}name-list\gt{}]
2528    \index[dir]{StorageACL }
2529    This directive is used to  specify a list of Storage resource names that can
2530 be accessed by  the console.  
2531
2532 \item [ScheduleACL = \lt{}name-list\gt{}]
2533    \index[dir]{ScheduleACL }
2534    This directive is used to  specify a list of Schedule resource names that can
2535 be accessed by  the console.  
2536
2537 \item [PoolACL = \lt{}name-list\gt{}]
2538    \index[dir]{PoolACL }
2539    This directive is used to  specify a list of Pool resource names that can be
2540 accessed by  the console.  
2541
2542 \item [FileSetACL = \lt{}name-list\gt{}]
2543    \index[dir]{FileSetACL }
2544    This directive is used to  specify a list of FileSet resource names that can
2545 be accessed by  the console.  
2546
2547 \item [CatalogACL = \lt{}name-list\gt{}]
2548    \index[dir]{CatalogACL }
2549    This directive is used to  specify a list of Catalog resource names that can
2550 be accessed by  the console.  
2551
2552 \item [CommandACL = \lt{}name-list\gt{}]
2553    \index[dir]{CommandACL }
2554    This directive is used to  specify a list of of console commands that can be
2555 executed by  the console. 
2556 \end{description}
2557
2558 Aside from Director resource names and console command names, the special
2559 keyword {\bf *all*} can be specified in any of the above access control lists.
2560 When this keyword is present, any resource or command name (which ever is
2561 appropriate) will be accepted. For an example configuration file, please see
2562 the 
2563 \ilink{Console Configuration}{_ChapterStart36} chapter of this
2564 manual. 
2565
2566 \subsection*{The Counter Resource}
2567 \label{CounterResource}
2568 \index[general]{Resource!Counter}
2569 \index[general]{Counter Resource}
2570 \addcontentsline{toc}{subsection}{Counter Resource}
2571
2572 The Counter Resource defines a counter variable that can be accessed by
2573 variable expansion used for creating Volume labels with the {\bf LabelFormat}
2574 directive. See the 
2575 \ilink{LabelFormat}{Label} directive in this chapter for more
2576 details. 
2577
2578 \begin{description}
2579
2580 \item [Counter] 
2581    \index[dir]{Counter}
2582    Start of the Counter resource.  Counter directives are optional. 
2583
2584 \item [Name = \lt{}name\gt{}]
2585    \index[dir]{Name }
2586    The name of the Counter.  This is the name you will use in the variable
2587 expansion  to reference the counter value.  
2588
2589 \item [Minimum = \lt{}integer\gt{}]
2590    \index[dir]{Minimum }
2591    This specifies the minimum  value that the counter can have. It also becomes
2592 the default.  If not supplied, zero is assumed.  
2593
2594 \item [Maximum = \lt{}integer\gt{}]
2595    \index[dir]{Maximum }
2596    This is the maximum value  value that the counter can have. If not specified
2597 or set to  zero, the counter can have a maximum value of 2,147,483,648  (2 to
2598 the 31 power). When the counter is incremented past  this value, it is reset
2599 to the Minimum.  
2600
2601 \item [*WrapCounter = \lt{}counter-name\gt{}]
2602    \index[dir]{*WrapCounter }
2603    If this value  is specified, when the counter is incremented past the
2604 maximum 
2605 and thus reset to the minimum, the counter specified on the  {\bf WrapCounter}
2606 is incremented. (This is not currently  implemented). 
2607
2608 \item [Catalog = \lt{}catalog-name\gt{}]
2609    \index[dir]{Catalog }
2610    If this directive is  specified, the counter and its values will be saved in 
2611 the specified catalog. If this directive is not present, the  counter will be
2612 redefined each time that Bacula is started. 
2613 \end{description}
2614
2615 \subsection*{Example Director Configuration File}
2616 \label{SampleDirectorConfiguration}
2617 \index[general]{File!Example Director Configuration}
2618 \index[general]{Example Director Configuration File}
2619 \addcontentsline{toc}{subsection}{Example Director Configuration File}
2620
2621 An example Director configuration file might be the following: 
2622
2623 \footnotesize
2624 \begin{verbatim}
2625 #
2626 # Default Bacula Director Configuration file
2627 #
2628 #  The only thing that MUST be changed is to add one or more
2629 #   file or directory names in the Include directive of the
2630 #   FileSet resource.
2631 #
2632 #  For Bacula release 1.15 (5 March 2002) -- redhat
2633 #
2634 #  You might also want to change the default email address
2635 #   from root to your address.  See the "mail" and "operator"
2636 #   directives in the Messages resource.
2637 #
2638 Director {                            # define myself
2639   Name = rufus-dir
2640   QueryFile = "/home/kern/bacula/bin/query.sql"
2641   WorkingDirectory = "/home/kern/bacula/bin/working"
2642   PidDirectory = "/home/kern/bacula/bin/working"
2643   Password = "XkSfzu/Cf/wX4L8Zh4G4/yhCbpLcz3YVdmVoQvU3EyF/"
2644 }
2645 # Define the backup Job
2646 Job {
2647   Name = "NightlySave"
2648   Type = Backup
2649   Level = Incremental                 # default
2650   Client=rufus-fd
2651   FileSet="Full Set"
2652   Schedule = "WeeklyCycle"
2653   Storage = DLTDrive
2654   Messages = Standard
2655   Pool = Default
2656 }
2657 Job {
2658   Name = "Restore"
2659   Type = Restore
2660   Client=rufus-fd
2661   FileSet="Full Set"
2662   Where = /tmp/bacula-restores
2663   Storage = DLTDrive
2664   Messages = Standard
2665   Pool = Default
2666 }
2667    
2668 # List of files to be backed up
2669 FileSet {
2670   Name = "Full Set"
2671   Include {
2672     Options { signature=SHA1 }
2673 #
2674 #  Put your list of files here, one per line or include an
2675 #    external list with:
2676 #
2677 #    @file-name
2678 #
2679 #  Note: / backs up everything
2680   File = /
2681  }
2682   Exclude {}
2683 }
2684 # When to do the backups
2685 Schedule {
2686   Name = "WeeklyCycle"
2687   Run = Full sun at 1:05
2688   Run = Incremental mon-sat at 1:05
2689 }
2690 # Client (File Services) to backup
2691 Client {
2692   Name = rufus-fd
2693   Address = rufus
2694   Catalog = MyCatalog
2695   Password = "MQk6lVinz4GG2hdIZk1dsKE/LxMZGo6znMHiD7t7vzF+"
2696   File Retention = 60d      # sixty day file retention
2697   Job Retention = 1y        # 1 year Job retention
2698   AutoPrune = yes           # Auto apply retention periods
2699 }
2700 # Definition of DLT tape storage device
2701 Storage {
2702   Name = DLTDrive
2703   Address = rufus
2704   Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2705   Device = "HP DLT 80"      # same as Device in Storage daemon
2706   Media Type = DLT8000      # same as MediaType in Storage daemon
2707 }
2708 # Definition for a DLT autochanger device
2709 Storage {
2710   Name = Autochanger
2711   Address = rufus
2712   Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2713   Device = "Autochanger"    # same as Device in Storage daemon
2714   Media Type = DLT-8000     # Different from DLTDrive
2715   Autochanger = yes
2716 }
2717 # Definition of DDS tape storage device
2718 Storage {
2719   Name = SDT-10000
2720   Address = rufus
2721   Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2722   Device = SDT-10000        # same as Device in Storage daemon
2723   Media Type = DDS-4        # same as MediaType in Storage daemon
2724 }
2725 # Definition of 8mm tape storage device
2726 Storage {
2727   Name = "8mmDrive"
2728   Address = rufus
2729   Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2730   Device = "Exabyte 8mm"
2731   MediaType = "8mm"
2732 }
2733 # Definition of file storage device
2734 Storage {
2735   Name = File
2736   Address = rufus
2737   Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2738   Device = FileStorage
2739   Media Type = File
2740 }
2741 # Generic catalog service
2742 Catalog {
2743   Name = MyCatalog
2744   dbname = bacula; user = bacula; password = ""
2745 }
2746 # Reasonable message delivery -- send most everything to
2747 #   the email address and to the console
2748 Messages {
2749   Name = Standard
2750   mail = root@localhost = all, !skipped, !terminate
2751   operator = root@localhost = mount
2752   console = all, !skipped, !saved
2753 }
2754     
2755 # Default pool definition
2756 Pool {
2757   Name = Default
2758   Pool Type = Backup
2759   AutoPrune = yes
2760   Recycle = yes
2761 }
2762 #
2763 # Restricted console used by tray-monitor to get the status of the director
2764 #
2765 Console {
2766   Name = Monitor
2767   Password = "GN0uRo7PTUmlMbqrJ2Gr1p0fk0HQJTxwnFyE4WSST3MWZseR"
2768   CommandACL = status, .status
2769 }
2770 \end{verbatim}
2771 \normalsize