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}
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.
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.
18 \subsection*{Director Resource Types}
19 \index[general]{Types!Director Resource}
20 \index[general]{Director Resource Types}
21 \addcontentsline{toc}{subsection}{Director Resource Types}
23 Director resource type may be one of the following:
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:
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.
37 \ilink{Job}{JobResource} -- to define the backup/restore Jobs
38 and to tie together the Client, FileSet and Schedule resources to be used
41 \ilink{JobDefs}{JobDefsResource} -- optional resource for
42 providing defaults for Job resources.
44 \ilink{Schedule}{ScheduleResource} -- to define when a Job is to
45 be automatically run by {\bf Bacula's} internal scheduler.
47 \ilink{FileSet}{FileSetResource} -- to define the set of files
48 to be backed up for each Client.
50 \ilink{Client}{ClientResource2} -- to define what Client is to be
53 \ilink{Storage}{StorageResource2} -- to define on what physical
54 device the Volumes should be mounted.
56 \ilink{Pool}{PoolResource} -- to define the pool of Volumes
57 that can be used for a particular Job.
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.
62 \ilink{Messages}{_ChapterStart15} -- to define where error and
63 information messages are to be sent or logged.
66 \subsection*{The Director Resource}
67 \label{DirectorResource4}
68 \index[general]{Director Resource}
69 \index[general]{Resource!Director}
70 \addcontentsline{toc}{subsection}{Director Resource}
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.
81 Start of the Director resource. One and only one director resource must be
84 \item [Name = \lt{}name\gt{}]
86 The director name used by the system administrator. This directive is
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.
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.
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.
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.
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
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.
139 \item [Scripts Directory = \lt{}Directory\gt{}]
140 \index[dir]{Scripts Directory }
141 This directive is optional and, if defined, specifies a directory in
142 which the Director will look for the Python startup script {\bf
143 DirStartup.py}. This directory may be shared by other Bacula daemons.
144 Standard shell expansion of the directory is done when the configuration
145 file is read so that values such as {\bf \$HOME} will be properly
148 \item [QueryFile = \lt{}Path\gt{}]
149 \index[dir]{QueryFile }
150 This directive is mandatory and specifies a directory and file in which
151 the Director can find the canned SQL statements for the {\bf Query}
152 command of the Console. Standard shell expansion of the {\bf Path} is
153 done when the configuration file is read so that values such as {\bf
154 \$HOME} will be properly expanded. This directive is required.
156 \label{DirMaxConJobs}
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
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
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.
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.
181 For more details on getting concurrent jobs to run, please see
182 \ilink{Running Concurrent Jobs}{ConcurrentJobs} in the Tips chapter
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
188 attempting to contact the File daemon to start a job, and after which
189 the Director will cancel the job. The default is 30 minutes.
191 \item [SD Connect Timeout = \lt{}time\gt{}]
192 \index[dir]{SD Connect Timeout }
193 where {\bf time} is the time that the Director should continue
194 attempting to contact the Storage daemon to start a job, and after which
195 the Director will cancel the job. The default is 30 minutes.
197 \item [DirAddresses = \lt{}IP-address-specification\gt{}]
198 \index[dir]{DirAddresses }
199 Specify the ports and addresses on which the Director daemon will listen
200 for Bacula Console connections. Probably the simplest way to explain
201 this is to show an example:
205 DirAddresses = { ip = {
206 addr = 1.2.3.4; port = 1205;}
208 addr = 1.2.3.4; port = http;}
221 addr = 201:220:222::2
224 addr = bluedot.thun.net
230 where ip, ip4, ip6, addr, and port are all keywords. Note, that the address
231 can be specified as either a dotted quadruple, or IPv6 colon notation, or as
232 a symbolic name (only in the ip specification). Also, port can be specified
233 as a number or as the mnemonic value from the /etc/services file. If a port
234 is not specified, the default will be used. If an ip section is specified,
235 the resolution can be made either by IPv4 or IPv6. If ip4 is specified, then
236 only IPv4 resolutions will be permitted, and likewise with ip6.
238 \item [DIRport = \lt{}port-number\gt{}]
239 \index[dir]{DIRport }
240 Specify the port (a positive integer) on which the Director daemon will
241 listen for Bacula Console connections. This same port number must be
242 specified in the Director resource of the Console configuration file. The
243 default is 9101, so normally this directive need not be specified. This
244 directive is not needed if you specify DirAddresses.
246 \item [DirAddress = \lt{}IP-Address\gt{}]
247 \index[dir]{DirAddress }
248 This directive is optional, but if it is specified, it will cause the
249 Director server (for the Console program) to bind to the specified {\bf
250 IP-Address}, which is either a domain name or an IP address specified as a
251 dotted quadruple in string or quoted string format. If this directive is not
252 specified, the Director will bind to any available address (the default).
253 Note, unlike the DirAddresses specification noted above, this directive only
254 permits a single address to be specified. This directive is not needed if you
255 specify a DirAddresses (not plural).
258 The following is an example of a valid Director resource definition:
264 WorkingDirectory = "$HOME/bacula/bin/working"
265 Password = UA_password
266 PidDirectory = "$HOME/bacula/bin/working"
267 QueryFile = "$HOME/bacula/bin/query.sql"
273 \subsection*{The Job Resource}
275 \index[general]{Resource!Job}
276 \index[general]{Job Resource}
277 \addcontentsline{toc}{subsection}{Job Resource}
279 The Job resource defines a Job (Backup, Restore, ...) that Bacula must
280 perform. Each Job resource definition contains the name of a Client and
281 a FileSet to backup, the Schedule for the Job, where the data
282 are to be stored, and what media Pool can be used. In effect, each Job
283 resource must specify What, Where, How, and When or FileSet, Storage,
284 Backup/Restore/Level, and Schedule respectively. Note, the FileSet must
285 be specified for a restore job for historical reasons, but it is no longer used.
287 Only a single type ({\bf Backup}, {\bf Restore}, ...) can be specified for any
288 job. If you want to backup multiple FileSets on the same Client or multiple
289 Clients, you must define a Job for each one.
295 Start of the Job resource. At least one Job resource is required.
297 \item [Name = \lt{}name\gt{}]
299 The Job name. This name can be specified on the {\bf Run} command in the
300 console program to start a job. If the name contains spaces, it must be
301 specified between quotes. It is generally a good idea to give your job the
302 same name as the Client that it will backup. This permits easy
303 identification of jobs.
305 When the job actually runs, the unique Job Name will consist of the name you
306 specify here followed by the date and time the job was scheduled for
307 execution. This directive is required.
309 \item [Type = \lt{}job-type\gt{}]
311 The {\bf Type} directive specifies the Job type, which may be one of the
312 following: {\bf Backup}, {\bf Restore}, {\bf Verify}, or {\bf Admin}. This
313 directive is required. Within a particular Job Type, there are also Levels
314 as discussed in the next item.
320 Run a backup Job. Normally you will have at least one Backup job for each
321 client you want to save. Normally, unless you turn off cataloging, most all
322 the important statistics and data concerning files backed up will be placed
327 Run a restore Job. Normally, you will specify only one Restore job which
329 as a sort of prototype that you will modify using the console program in
330 order to perform restores. Although certain basic information from a Restore
331 job is saved in the catalog, it is very minimal compared to the information
332 stored for a Backup job -- for example, no File database entries are
333 generated since no Files are saved.
337 Run a verify Job. In general, {\bf verify} jobs permit you to compare the
338 contents of the catalog to the file system, or to what was backed up. In
339 addition, to verifying that a tape that was written can be read, you can
340 also use {\bf verify} as a sort of tripwire intrusion detection.
344 Run an admin Job. An {\bf Admin} job can be used to periodically run catalog
345 pruning, if you do not want to do it at the end of each {\bf Backup} Job.
346 Although an Admin job is recorded in the catalog, very little data is saved.
351 \item [Level = \lt{}job-level\gt{}]
353 The Level directive specifies the default Job level to be run. Each
355 Job Type (Backup, Restore, ...) has a different set of Levels that can be
356 specified. The Level is normally overridden by a different value that is
357 specified in the {\bf Schedule} resource. This directive is not required, but
358 must be specified either by a {\bf Level} directive or as an override
359 specified in the {\bf Schedule} resource.
361 For a {\bf Backup} Job, the Level may be one of the following:
367 is all files in the FileSet whether or not they have changed.
370 \index[dir]{Incremental}
371 is all files specified in the FileSet that have changed since the last successful backup of the
372 the same Job using the same FileSet and Client.
373 If the Director cannot find a previous valid Full backup then
374 the job will be upgraded into a Full backup. When the Director looks for a
375 valid backup record in the catalog database, it looks for a previous
379 \item The same Job name.
380 \item The same Client name.
381 \item The same FileSet (any change to the definition of the FileSet such as
382 adding or deleting a file in the Include or Exclude sections constitutes a
384 \item The Job was a Full, Differential, or Incremental backup.
385 \item The Job terminated normally (i.e. did not fail or was not canceled).
388 If all the above conditions do not hold, the Director will upgrade the
389 Incremental to a Full save. Otherwise, the Incremental backup will be
390 performed as requested.
392 The File daemon (Client) decides which files to backup for an Incremental
393 backup by comparing start time of the prior Job (Full, Differential, or
394 Incremental) against the time each file was last "modified" (st\_mtime) and
395 the time its attributes were last "changed"(st\_ctime). If the file was
396 modified or its attributes changed on or after this start time, it will then
399 Please note that some virus scanning software may change st\_ctime while
400 doing the scan. For example, if the virus scanning program attempts to
401 reset the access time (st\_atime), which Bacula does not use, it will cause
402 st\_ctime to change and hence Bacula will backup the file during an
403 Incremental or Differential backup. In the case of Sophos virus scanning, you
404 can prevent it from resetting the access time (st\_atime) and hence changing
405 st\_ctime by using the {\bf \verb:--:no-reset-atime} option. For other
407 please see their manual.
409 When Bacula does an Incremental backup, all modified files that are still on
410 the system are backed up. However, any file that has been deleted since the
411 last Full backup remains in the Bacula catalog, which means that if between
412 a Full save and the time you do a restore, some files are deleted, those
413 deleted files will also be restored. The deleted files will no longer appear
414 in the catalog after doing another Full save. However, to remove deleted
415 files from the catalog during an Incremental backup is quite a time consuming
416 process and not currently implemented in Bacula.
418 In addition, if you move a directory rather than copy it, the files in it do not
419 have their modification time (st\_mtime) or their attribute change time
421 changed. As a consequence, those files will probably not be backed up by an
423 or Differential backup which depend solely on these time stamps. If you move a
425 and wish it to be properly backed up, it is generally preferable to copy it,
430 \index[dir]{Differential}
431 is all files specified in the FileSet that have changed since the last
432 successful Full backup of the same Job. If the Director cannot find a
433 valid previous Full backup for the same Job, FileSet, and Client,
434 backup, then the Differential job will be upgraded into a Full backup.
435 When the Director looks for a valid Full backup record in the catalog
436 database, it looks for a previous Job with:
439 \item The same Job name.
440 \item The same Client name.
441 \item The same FileSet (any change to the definition of the FileSet such as
442 adding or deleting a file in the Include or Exclude sections constitutes a
444 \item The Job was a FULL backup.
445 \item The Job terminated normally (i.e. did not fail or was not canceled).
448 If all the above conditions do not hold, the Director will upgrade the
449 Differential to a Full save. Otherwise, the Differential backup will be
450 performed as requested.
452 The File daemon (Client) decides which files to backup for a differential
453 backup by comparing the start time of the prior Full backup Job against the
454 time each file was last "modified" (st\_mtime) and the time its attributes
455 were last "changed" (st\_ctime). If the file was modified or its attributes
456 were changed on or after this start time, it will then be backed up. The
457 start time used is displayed after the {\bf Since} on the Job report. In rare
458 cases, using the start time of the prior backup may cause some files to be
459 backed up twice, but it ensures that no change is missed. As with the
460 Incremental option, you should ensure that the clocks on your server and
461 client are synchronized or as close as possible to avoid the possibility of a
462 file being skipped. Note, on versions 1.33 or greater Bacula automatically
463 makes the necessary adjustments to the time between the server and the client
464 so that the times Bacula uses are synchronized.
466 When Bacula does a Differential backup, all modified files that are still
467 on the system are backed up. However, any file that has been deleted since
468 the last Full backup remains in the Bacula catalog, which means that if
469 between a Full save and the time you do a restore, some files are deleted,
470 those deleted files will also be restored. The deleted files will no
471 longer appear in the catalog after doing another Full save. However, to
472 remove deleted files from the catalog during a Differential backup is quite
473 a time consuming process and not currently implemented in Bacula. It is,
474 however, a planned future feature.
477 As noted above, if you move a directory rather than copy it, the
478 files in it do not have their modification time (st\_mtime) or
479 their attribute change time (st\_ctime) changed. As a
480 consequence, those files will probably not be backed up by an
481 Incremental or Differential backup which depend solely on these
482 time stamps. If you move a directory, and wish it to be
483 properly backed up, it is generally preferable to copy it, then
484 delete the original. Alternatively, you can move the directory, then
485 use the {\bf touch} program to update the timestamps.
487 Every once and a while, someone asks why we need Differential
488 backups as long as Incremental backups pickup all changed files.
489 There are possibly many answers to this question, but the one
490 that is the most important for me is that it effectively combines
491 all the Incremental and Differential backups since the last Full
492 backup into a single Differential backup. This has two effects:
493 1. It gives some redundancy. 2. More importantly, it reduces the
494 number of Volumes that are needed to do a restore effectively
495 eliminating the need to read all the volumes on which the
496 preceding Incremental and Differential backups since the last
502 For a {\bf Restore} Job, no level needs to be specified.
504 For a {\bf Verify} Job, the Level may be one of the following:
509 \index[dir]{InitCatalog}
510 does a scan of the specified {\bf FileSet} and stores the file
511 attributes in the Catalog database. Since no file data is saved, you
512 might ask why you would want to do this. It turns out to be a very
513 simple and easy way to have a {\bf Tripwire} like feature using {\bf
514 Bacula}. In other words, it allows you to save the state of a set of
515 files defined by the {\bf FileSet} and later check to see if those files
516 have been modified or deleted and if any new files have been added.
517 This can be used to detect system intrusion. Typically you would
518 specify a {\bf FileSet} that contains the set of system files that
519 should not change (e.g. /sbin, /boot, /lib, /bin, ...). Normally, you
520 run the {\bf InitCatalog} level verify one time when your system is
521 first setup, and then once again after each modification (upgrade) to
522 your system. Thereafter, when your want to check the state of your
523 system files, you use a {\bf Verify} {\bf level = Catalog}. This
524 compares the results of your {\bf InitCatalog} with the current state of
529 Compares the current state of the files against the state previously
530 saved during an {\bf InitCatalog}. Any discrepancies are reported. The
531 items reported are determined by the {\bf verify} options specified on
532 the {\bf Include} directive in the specified {\bf FileSet} (see the {\bf
533 FileSet} resource below for more details). Typically this command will
534 be run once a day (or night) to check for any changes to your system
537 Please note! If you run two Verify Catalog jobs on the same client at
538 the same time, the results will certainly be incorrect. This is because
539 Verify Catalog modifies the Catalog database while running in order to
542 \item [VolumeToCatalog]
543 \index[dir]{VolumeToCatalog}
544 This level causes Bacula to read the file attribute data written to the
545 Volume from the last Job. The file attribute data are compared to the values
546 saved in the Catalog database and any differences are reported. This is
547 similar to the {\bf Catalog} level except that instead of comparing the disk
548 file attributes to the catalog database, the attribute data written to the
549 Volume is read and compared to the catalog database. Although the attribute
550 data including the signatures (MD5 or SHA1) are compared, the actual file data
551 is not compared (it is not in the catalog).
553 Please note! If you run two Verify VolumeToCatalog jobs on the same client at
554 the same time, the results will certainly be incorrect. This is because the
555 Verify VolumeToCatalog modifies the Catalog database while running.
557 \item [DiskToCatalog]
558 \index[dir]{DiskToCatalog}
559 This level causes Bacula to read the files as they currently are on disk,
561 to compare the current file attributes with the attributes saved in the
562 catalog from the last backup for the job specified on the {\bf VerifyJob}
563 directive. This level differs from the {\bf Catalog} level described above by
564 the fact that it doesn't compare against a previous Verify job but against a
565 previous backup. When you run this level, you must supply the verify options
566 on your Include statements. Those options determine what attribute fields are
569 This command can be very useful if you have disk problems because it will
570 compare the current state of your disk against the last successful backup,
571 which may be several jobs.
573 Note, the current implementation (1.32c) does not identify files that have
577 \item [Verify Job = \lt{}Job-Resource-Name\gt{}]
578 \index[dir]{Verify Job }
579 If you run a verify job without this directive, the last job run will be
580 compared with the catalog, which means that you must immediately follow a
581 backup by a verify command. If you specify a {\bf Verify Job} Bacula will
582 find the last job with that name that ran. This permits you to run all your
583 backups, then run Verify jobs on those that you wish to be verified (most
584 often a {\bf VolumeToCatalog}) so that the tape just written is re-read.
586 \item [JobDefs = \lt{}JobDefs-Resource-Name\gt{}]
587 \index[dir]{JobDefs }
588 If a JobDefs-Resource-Name is specified, all the values contained in the
589 named JobDefs resource will be used as the defaults for the current Job. Any
590 value that you explicitly define in the current Job resource, will override
591 any defaults specified in the JobDefs resource. The use of this directive
592 permits writing much more compact Job resources where the bulk of the
593 directives are defined in one or more JobDefs. This is particularly useful if
594 you have many similar Jobs but with minor variations such as different
595 Clients. A simple example of the use of JobDefs is provided in the default
596 bacula-dir.conf file.
598 \item [Bootstrap = \lt{}bootstrap-file\gt{}]
599 \index[dir]{Bootstrap }
600 The Bootstrap directive specifies a bootstrap file that, if provided, will
601 be used during {\bf Restore} Jobs and is ignored in other Job types. The {\bf
602 bootstrap} file contains the list of tapes to be used in a restore Job as
603 well as which files are to be restored. Specification of this directive is
604 optional, and if specified, it is used only for a restore job. In addition,
605 when running a Restore job from the console, this value can be changed.
607 If you use the {\bf Restore} command in the Console program, to start a
608 restore job, the {\bf bootstrap} file will be created automatically from the
609 files you select to be restored.
611 For additional details of the {\bf bootstrap} file, please see
612 \ilink{Restoring Files with the Bootstrap File}{_ChapterStart43}
613 chapter of this manual.
615 \label{writebootstrap}
616 \item [Write Bootstrap = \lt{}bootstrap-file-specification\gt{}]
618 The {\bf writebootstrap} directive specifies a file name where Bacula will
619 write a {\bf bootstrap} file for each Backup job run. Thus this directive
620 applies only to Backup Jobs. If the Backup job is a Full save, Bacula will
621 erase any current contents of the specified file before writing the bootstrap
622 records. If the Job is an Incremental save, Bacula will append the current
623 bootstrap record to the end of the file.
625 Using this feature, permits you to constantly have a bootstrap file that can
626 recover the current state of your system. Normally, the file specified should
627 be a mounted drive on another machine, so that if your hard disk is lost,
628 you will immediately have a bootstrap record available. Alternatively, you
629 should copy the bootstrap file to another machine after it is updated.
631 If the {\bf bootstrap-file-specification} begins with a vertical bar (|),
632 Bacula will use the specification as the name of a program to which it will
633 pipe the bootstrap record. It could for example be a shell script that emails
634 you the bootstrap record.
636 For more details on using this file, please see the chapter entitled
637 \ilink{The Bootstrap File}{_ChapterStart43} of this manual.
639 \item [Client = \lt{}client-resource-name\gt{}]
641 The Client directive specifies the Client (File daemon) that will be used in
642 the current Job. Only a single Client may be specified in any one Job. The
643 Client runs on the machine to be backed up, and sends the requested files to
644 the Storage daemon for backup, or receives them when restoring. For
645 additional details, see the
646 \ilink{Client Resource section}{ClientResource2} of this chapter.
647 This directive is required.
649 \item [FileSet = \lt{}FileSet-resource-name\gt{}]
650 \index[dir]{FileSet }
651 The FileSet directive specifies the FileSet that will be used in the
653 Job. The FileSet specifies which directories (or files) are to be backed up,
654 and what options to use (e.g. compression, ...). Only a single FileSet
655 resource may be specified in any one Job. For additional details, see the
656 \ilink{FileSet Resource section}{FileSetResource} of this
657 chapter. This directive is required.
659 \item [Messages = \lt{}messages-resource-name\gt{}]
660 \index[dir]{Messages }
661 The Messages directive defines what Messages resource should be used for
663 job, and thus how and where the various messages are to be delivered. For
664 example, you can direct some messages to a log file, and others can be sent
665 by email. For additional details, see the
666 \ilink{Messages Resource}{_ChapterStart15} Chapter of this
667 manual. This directive is required.
669 \item [Pool = \lt{}pool-resource-name\gt{}]
671 The Pool directive defines the pool of Volumes where your data can be backed
672 up. Many Bacula installations will use only the {\bf Default} pool. However,
673 if you want to specify a different set of Volumes for different Clients or
674 different Jobs, you will probably want to use Pools. For additional details,
676 \ilink{Pool Resource section}{PoolResource} of this chapter. This
677 directive is required.
679 \item [Full Backup Pool = \lt{}pool-resource-name\gt{}]
680 \index[dir]{Full Backup Pool }
681 The {\it Full Backup Pool} specifies a Pool to be used for Full backups. It
682 will override any Pool specification during a Full backup. This directive is
685 \item [Differential Backup Pool = \lt{}pool-resource-name\gt{}]
686 \index[dir]{Differential Backup Pool }
687 The {\it Differential Backup Pool} specifies a Pool to be used for
688 Differential backups. It will override any Pool specification during a
689 Differential backup. This directive is optional.
691 \item [Incremental Backup Pool = \lt{}pool-resource-name\gt{}]
692 \index[dir]{Incremental Backup Pool }
693 The {\it Incremental Backup Pool} specifies a Pool to be used for
695 backups. It will override any Pool specification during an Incremental
697 This directive is optional.
699 \item [Schedule = \lt{}schedule-name\gt{}]
700 \index[dir]{Schedule }
701 The Schedule directive defines what schedule is to be used for the Job.
702 The schedule in turn determines when the Job will be automatically
703 started and what Job level (i.e. Full, Incremental, ...) is to be run.
704 This directive is optional, and if left out, the Job can only be started
705 manually using the Console program. Although you may specify only a
706 single Schedule resource for any one job, the Schedule resource may
707 contain multiple {\bf Run} directives, which allow you to run the Job at
708 many different times, and each {\bf run} directive permits overriding
709 the default Job Level Pool, Storage, and Messages resources. This gives
710 considerable flexibility in what can be done with a single Job. For
711 additional details, see the \ilink{Schedule Resource
712 Chapter}{ScheduleResource} of this manual.
715 \item [Storage = \lt{}storage-resource-name\gt{}]
716 \index[dir]{Storage }
717 The Storage directive defines the name of the storage services where you
719 to backup the FileSet data. For additional details, see the
720 \ilink{Storage Resource Chapter}{StorageResource2} of this manual.
721 This directive is required.
723 \item [Max Start Delay = \lt{}time\gt{}]
724 \index[dir]{Max Start Delay }
725 The time specifies the maximum delay between the scheduled time and the
726 actual start time for the Job. For example, a job can be scheduled to
727 run at 1:00am, but because other jobs are running, it may wait to run.
728 If the delay is set to 3600 (one hour) and the job has not begun to run
729 by 2:00am, the job will be canceled. This can be useful, for example,
730 to prevent jobs from running during day time hours. The default is 0
731 which indicates no limit.
733 \item [Max Run Time = \lt{}time\gt{}]
734 \index[dir]{Max Run Time }
735 The time specifies the maximum allowed time that a job may run, counted
736 from when the job starts, ({\bf not} necessarily the same as when the
737 job was scheduled). This directive is implemented in version 1.33 and
740 \item [Max Wait Time = \lt{}time\gt{}]
741 \index[dir]{Max Wait Time }
742 The time specifies the maximum allowed time that a job may block waiting
743 for a resource (such as waiting for a tape to be mounted, or waiting for
744 the storage or file daemons to perform their duties), counted from the
745 when the job starts, ({\bf not} necessarily the same as when the job was
746 scheduled). This directive is implemented only in version 1.33 and
751 \item [Incremental Max Wait Time = \lt{}time\gt{}]
752 \index[dir]{Incremental Max Wait Time }
753 The time specifies the maximum allowed time that an Incremental backup
754 job may block waiting for a resource (such as waiting for a tape to be
755 mounted, or waiting for the storage or file daemons to perform their
756 duties), counted from the when the job starts, ({\bf not} necessarily
757 the same as when the job was scheduled). Please note that if there is a
758 {\bf Max Wait Time} it may also be applied to the job.
760 \item [Differential Max Wait Time = \lt{}time\gt{}]
761 \index[dir]{Differential Max Wait Time }
762 The time specifies the maximum allowed time that a Differential backup
763 job may block waiting for a resource (such as waiting for a tape to be
764 mounted, or waiting for the storage or file daemons to perform their
765 duties), counted from the when the job starts, ({\bf not} necessarily
766 the same as when the job was scheduled). Please note that if there is a
767 {\bf Max Wait Time} it may also be applied to the job.
769 \item [Prefer Mounted Volumes = \lt{}yes|no\gt{}]
770 \index[dir]{Prefer Mounted Volumes}
771 If the Prefer Mounted Volumes directive is set to {\bf yes} (default
772 yes), the Storage daemon is requested to select either an Autochanger or
773 a drive with a valid Volume already mounted in preference to a drive
774 that is not ready. If no drive with a suitable Volume is available, it
775 will select the first available drive.
777 If the directive is set to {\bf no}, the Storage daemon will prefer
778 finding an unused drive, otherwise, each job started will append to the
779 same Volume (assuming the Pool is the same for all jobs). Setting
780 Prefer Mounted Volumes to no can be useful for those sites particularly
781 with multiple drive autochangers that prefer to maximumize backup
782 throughput at the expense of using additional drives and Volumes. As an
783 optimization, when using multiple drives, you will probably want to
784 start each of your jobs one after another with approximately 5 second
785 intervals. This will help ensure that each night, the same drive
786 (Volume) is selected for the same job, otherwise, when you do a restore,
787 you may find the files spread over many more Volumes than necessary.
790 \item [Prune Jobs = \lt{}yes|no\gt{}]
791 \index[dir]{Prune Jobs }
792 Normally, pruning of Jobs from the Catalog is specified on a Client by
793 Client basis in the Client resource with the {\bf AutoPrune} directive.
794 If this directive is specified (not normally) and the value is {\bf
795 yes}, it will override the value specified in the Client resource. The
799 \item [Prune Files = \lt{}yes|no\gt{}]
800 \index[dir]{Prune Files }
801 Normally, pruning of Files from the Catalog is specified on a Client by
802 Client basis in the Client resource with the {\bf AutoPrune} directive.
803 If this directive is specified (not normally) and the value is {\bf
804 yes}, it will override the value specified in the Client resource. The
807 \item [Prune Volumes = \lt{}yes|no\gt{}]
808 \index[dir]{Prune Volumes }
809 Normally, pruning of Volumes from the Catalog is specified on a Client
810 by Client basis in the Client resource with the {\bf AutoPrune}
811 directive. If this directive is specified (not normally) and the value
812 is {\bf yes}, it will override the value specified in the Client
813 resource. The default is {\bf no}.
815 \item [Run Before Job = \lt{}command\gt{}]
816 \index[dir]{Run Before Job }
817 The specified {\bf command} is run as an external program prior to
818 running the current Job. Any output sent by the command to standard output
819 will be included in the Bacula job report. The command string must be a
820 valid program name or name of a shell script. This directive is not
821 required, but if it is defined, and if the exit code of the program run
822 is non-zero, the current Bacula job will be canceled. In addition, the
823 command string is parsed then fed to the execvp() function, which means
824 that the path will be searched to execute your specified command, but
825 there is no shell interpretation, as a consequence, if you invoke
826 complicated commands or want any shell features such as redirection or
827 piping, you must call a shell script and do it inside that script.
829 Before submitting the specified command to the operating system, Bacula
830 performs character substitution of the following characters:
848 The Job Exit Status code \%e edits the following values:
850 \index[dir]{Exit Status}
857 \item Unknown term code
860 Thus if you edit it on a command line, you will need to enclose
861 it within some sort of quotes.
863 Bacula checks the exit status of the RunBeforeJob program. If it is
864 non-zero, the job will be error terminated. Lutz Kittler has pointed
865 out that using the RunBeforJob directive can be a simple way to modify
866 your schedules during a holiday. For example, suppose that you normally
867 do Full backups on Fridays, but Thursday and Friday are holidays. To
868 avoid having to change tapes between Thursday and Friday when no one is
869 in the office, you can create a RunBeforeJob that returns a non-zero
870 status on Thursday and zero on all other days. That way, the Thursday
871 job will not run, and on Friday the tape you inserted on Wednesday
872 before leaving will be used.
874 \item [Run After Job = \lt{}command\gt{}]
875 \index[dir]{Run After Job }
876 The specified {\bf command} is run as an external program after the
877 current job terminates. This directive is not required. The command
878 string must be a valid program name or name of a shell script. If the
879 exit code of the program run is non-zero, the current Bacula job will
880 terminate in error. Before submitting the specified command to the
881 operating system, Bacula performs character substitution as described
882 above for the {\bf Run Before Job} directive.
884 An example of the use of this directive is given in the
885 \ilink{Tips Chapter}{JobNotification} of this manual. As of version
886 1.30, Bacula checks the exit status of the RunAfter program. If it is
887 non-zero, the job will be terminated in error.
889 \item [Client Run Before Job = \lt{}command\gt{}]
890 \index[dir]{Client Run Before Job }
891 This directive is the same as {\bf Run Before Job} except that the program is run on
892 the client machine. The same restrictions apply to Unix systems as noted
893 above for the {\bf Run Before Job}. In addition, for a Windows client on
894 version 1.33 and above, please take careful note that you must ensure a
895 correct path to your script. The script or program can be a .com, .exe or
896 a .bat file. However, if you specify a path, you must also specify the full
897 extension. Unix like commands will not work unless you have installed and
898 properly configured Cygwin in addition to and separately from Bacula.
900 {\bf Special Windows Considerations}
901 The command can be anything that cmd.exe or command.com will recognize as an
902 executable file. Specifying the executable's extension is optional, unless
903 there is an ambiguity. (i.e. ls.bat, ls.exe)
905 The System \%Path\% will be searched for the command. (under the environment
906 variable dialog you have have both System Environment and User Environment,
907 we believe that only the System environment will be available to bacula-fd,
908 if it is running as a service.)
910 System environment variables can be referenced with \%var\% and
911 used as either part of the command name or arguments.
913 When specifying a full path to an executable if the path or executable name
914 contains whitespace or special characters they will need to be quoted.
915 Arguments containing whitespace or special characters will also have to be
920 ClientRunBeforeJob = "\"C:/Program Files/Software
921 Vendor/Executable\" /arg1 /arg2 \"foo bar\""
925 The special characters \&()[]\{\}\^{}=;!'+,`\~{} will need to be quoted if
926 they are part of a filename or argument.
928 If someone is logged in, a blank "command" window running the commands
930 be present during the execution of the command.
932 Some Suggestions from Phil Stracchino for running on Win32 machines with the
933 native Win32 File daemon:
936 \item You might want the ClientRunBeforeJob directive to specify a .bat file
937 which runs the actual client-side commands, rather than trying to run
939 example) regedit /e directly.
940 \item The batch file should explicitly 'exit 0' on successful completion.
941 \item The path to the batch file should be specified in Unix form:
943 ClientRunBeforeJob = "c:/bacula/bin/systemstate.bat"
945 rather than DOS/Windows form:
949 "c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}systemstate.bat"
953 The following example of the use of the Client Run Before Job directive was
954 submitted by a user:\\
955 You could write a shell script to back up a DB2 database to a FIFO. The shell
965 db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING &
970 The following line in the Job resource in the bacula-dir.conf file:
973 Client Run Before Job = "su - mercuryd -c \"/u01/mercuryd/backupdb.sh '%t'
977 When the job is run, you will get messages from the output of the script
979 that the backup has started. Even though the command being run is
980 backgrounded with \&, the job will block until the "db2 BACKUP DATABASE"
982 thus the backup stalls.
984 To remedy this situation, the "db2 BACKUP DATABASE" line should be changed to
989 db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING > $DIR/backup.log
994 It is important to redirect the input and outputs of a backgrounded command to
995 /dev/null to prevent the script from blocking.
998 \item [Client Run After Job = \lt{}command\gt{}]
999 \index[dir]{Client Run After Job }
1000 This directive is the same as {\bf Run After Job} except that it is run on
1002 client machine. Note, please see the notes above in {\bf Client Run Before
1003 Job} concerning Windows clients.
1005 \item [Rerun Failed Levels = \lt{}yes|no\gt{}]
1006 \index[dir]{Rerun Failed Levels }
1007 If this directive is set to {\bf yes} (default no), and Bacula detects that
1009 previous job at a higher level (i.e. Full or Differential) has failed, the
1010 current job level will be upgraded to the higher level. This is particularly
1011 useful for Laptops where they may often be unreachable, and if a prior Full
1012 save has failed, you wish the very next backup to be a Full save rather
1014 whatever level it is started as.
1016 \item [Spool Data = \lt{}yes|no\gt{}]
1017 \index[dir]{Spool Data }
1018 If this directive is set to {\bf yes} (default no), the Storage daemon will
1019 be requested to spool the data for this Job to disk rather than write it
1020 directly to tape. Once all the data arrives or the spool files' maximum sizes
1021 are reached, the data will be despooled and written to tape. When this
1022 directive is set to yes, the Spool Attributes is also automatically set to
1023 yes. Spooling data prevents tape shoe-shine (start and stop) during
1024 Incremental saves. This option should not be used if you are writing to a
1027 \item [Spool Attributes = \lt{}yes|no\gt{}]
1028 \index[dir]{Spool Attributes }
1029 The default is set to {\bf no}, which means that the File attributes are
1031 by the Storage daemon to the Director as they are stored on tape. However,
1032 if you want to avoid the possibility that database updates will slow down
1033 writing to the tape, you may want to set the value to {\bf yes}, in which
1034 case the Storage daemon will buffer the File attributes and Storage
1035 coordinates to a temporary file in the Working Directory, then when writing
1036 the Job data to the tape is completed, the attributes and storage coordinates
1037 will be sent to the Director.
1039 \item [Where = \lt{}directory\gt{}]
1041 This directive applies only to a Restore job and specifies a prefix to the
1042 directory name of all files being restored. This permits files to be restored
1043 in a different location from which they were saved. If {\bf Where} is not
1044 specified or is set to backslash ({\bf /}), the files will be restored to
1045 their original location. By default, we have set {\bf Where} in the example
1046 configuration files to be {\bf /tmp/bacula-restores}. This is to prevent
1047 accidental overwriting of your files.
1049 \item [Replace = \lt{}replace-option\gt{}]
1050 \index[dir]{Replace }
1051 This directive applies only to a Restore job and specifies what happens when
1052 Bacula wants to restore a file or directory that already exists. You have the
1053 following options for {\bf replace-option}:
1059 when the file to be restored already exists, it is deleted and then replaced
1061 the copy that was backed up.
1064 \index[dir]{ifnewer}
1065 if the backed up file (on tape) is newer than the existing file, the existing
1066 file is deleted and replaced by the back up.
1069 \index[dir]{ifolder}
1070 if the backed up file (on tape) is older than the existing file, the existing
1071 file is deleted and replaced by the back up.
1075 if the backed up file already exists, Bacula skips restoring this file.
1078 \item [Prefix Links=\lt{}yes|no\gt{}]
1079 \index[dir]{Prefix Links}
1080 If a {\bf Where} path prefix is specified for a recovery job, apply it
1081 to absolute links as well. The default is {\bf No}. When set to {\bf
1082 Yes} then while restoring files to an alternate directory, any absolute
1083 soft links will also be modified to point to the new alternate
1084 directory. Normally this is what is desired -- i.e. everything is self
1085 consistent. However, if you wish to later move the files to their
1086 original locations, all files linked with absolute names will be broken.
1088 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
1089 \index[dir]{Maximum Concurrent Jobs }
1090 where \lt{}number\gt{} is the maximum number of Jobs from the current
1091 Job resource that can run concurrently. Note, this directive limits
1092 only Jobs with the same name as the resource in which it appears. Any
1093 other restrictions on the maximum concurrent jobs such as in the
1094 Director, Client, or Storage resources will also apply in addition to
1095 the limit specified here. The default is set to 1, but you may set it
1096 to a larger number. We strongly recommend that you read the WARNING
1097 documented under \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the
1098 Director's resource.
1100 \item [Reschedule On Error = \lt{}yes|no\gt{}]
1101 \index[dir]{Reschedule On Error }
1102 If this directive is enabled, and the job terminates in error, the job
1103 will be rescheduled as determined by the {\bf Reschedule Interval} and
1104 {\bf Reschedule Times} directives. If you cancel the job, it will not
1105 be rescheduled. The default is {\bf no} (i.e. the job will not be
1109 This specification can be useful for portables, laptops, or other
1110 machines that are not always connected to the network or switched on.
1112 \item [Reschedule Interval = \lt{}time-specification\gt{}]
1113 \index[dir]{Reschedule Interval }
1114 If you have specified {\bf Reschedule On Error = yes} and the job
1115 terminates in error, it will be rescheduled after the interval of time
1116 specified by {\bf time-specification}. See \ilink{the time
1117 specification formats}{Time} in the Configure chapter for details of
1118 time specifications. If no interval is specified, the job will not be
1119 rescheduled on error.
1121 \item [Reschedule Times = \lt{}count\gt{}]
1122 \index[dir]{Reschedule Times }
1123 This directive specifies the maximum number of times to reschedule the
1124 job. If it is set to zero (the default) the job will be rescheduled an
1125 indefinite number of times.
1127 \item [Run = \lt{}job-name\gt{}]
1128 \index[dir]{Run directive}
1129 \index[dir]{Clone a Job}
1130 The Run directive (not to be confused with the Run option in a
1131 Schedule) allows you to start other jobs or to clone jobs. By using the
1132 cloning keywords (see below), you can backup
1133 the same data (or almost the same data) to two or more drives
1134 at the same time. The {\bf job-name} is normally the same name
1135 as the current Job resource (thus creating a clone). However, it
1136 may be any Job name, so one job may start other related jobs.
1138 The part after the equal sign must be enclosed in double quotes,
1139 and can contain any string or set of options (overrides) that you
1140 can specify when entering the Run command from the console. For
1141 example {\bf storage=DDS-4 ...}. In addition, there are two special
1142 keywords that permit you to clone the current job. They are {\bf level=\%l}
1143 and {\bf since=\%s}. The \%l in the level keyword permits
1144 entering the actual level of the current job and the \%s in the since
1145 keyword permits putting the same time for comparison as used on the
1146 current job. Note, in the case of the since keyword, the \%s must be
1147 enclosed in double quotes, and thus they must be preceded by a backslash
1148 since they are already inside quotes. For example:
1151 run = "Nightly-backup level=%s since=\"%s\" storage=DDS-4"
1155 A cloned job will not start additional clones, so it is not
1156 possible to recurse.
1161 \item [Priority = \lt{}number\gt{}]
1162 \index[dir]{Priority }
1163 This directive permits you to control the order in which your jobs run
1164 by specifying a positive non-zero number. The higher the number, the
1165 lower the job priority. Assuming you are not running concurrent jobs,
1166 all queued jobs of priority 1 will run before queued jobs of priority 2
1167 and so on, regardless of the original scheduling order.
1169 The priority only affects waiting jobs that are queued to run, not jobs
1170 that are already running. If one or more jobs of priority 2 are already
1171 running, and a new job is scheduled with priority 1, the currently
1172 running priority 2 jobs must complete before the priority 1 job is run.
1174 The default priority is 10.
1176 If you want to run concurrent jobs, which is not recommended, you should
1178 these points in mind:
1181 \item To run concurrent jobs, you must set Maximum Concurrent Jobs = 2 in 5
1182 or 6 distinct places: in bacula-dir.conf in the Director, the Job, the
1183 Client, the Storage resources; in bacula-fd in the FileDaemon (or Client)
1184 resource, and in bacula-sd.conf in the Storage resource. If any one is
1185 missing, it will throttle the jobs to one at a time.
1186 \item Bacula concurrently runs jobs of only one priority at a time. It will
1187 not simultaneously run a priority 1 and a priority 2 job.
1188 \item If Bacula is running a priority 2 job and a new priority 1 job is
1189 scheduled, it will wait until the running priority 2 job terminates even if
1190 the Maximum Concurrent Jobs settings would otherwise allow two jobs to run
1192 \item Suppose that bacula is running a priority 2 job and a new priority 1 job
1193 is scheduled and queued waiting for the running priority 2 job to terminate.
1194 If you then start a second priority 2 job, the waiting priority 1 job will
1195 prevent the new priority 2 job from running concurrently with the running
1196 priority 2 job. That is: as long as there is a higher priority job waiting
1198 run, no new lower priority jobs will start even if the Maximum Concurrent
1199 Jobs settings would normally allow them to run. This ensures that higher
1200 priority jobs will be run as soon as possible.
1203 If you have several jobs of different priority, it may not best to start
1204 them at exactly the same time, because Bacula must examine them one at a
1205 time. If by Bacula starts a lower priority job first, then it will run
1206 before your high priority jobs. If you experience this problem, you may
1207 avoid it by starting any higher priority jobs a few seconds before lower
1208 priority ones. This insures that Bacula will examine the jobs in the
1209 correct order, and that your priority scheme will be respected.
1211 \label{WritePartAfterJob}
1212 \item [Write Part After Job = \lt{}yes|no\gt{}]
1213 \index[dir]{Write Part After Job }
1214 This directive is only implemented in version 1.37 and later.
1215 If this directive is set to {\bf yes} (default {\bf no}), a new part file
1216 will be created after the job is finished.
1218 It should be set to {\bf yes} when writing to devices that require mount
1219 (for example DVD), so you are sure that the current part, containing
1220 this job's data, is written to the device, and that no data is left in
1221 the temporary file on the hard disk. However, on some media, like DVD+R
1222 and DVD-R, a lot of space (about 10Mb) is lost every time a part is
1223 written. So, if you run several jobs each after another, you could set
1224 this directive to {\bf no} for all jobs, except the last one, to avoid
1225 wasting too much space, but to ensure that the data is written to the
1226 medium when all jobs are finished.
1228 It is ignored with tape and FIFO devices.
1231 The following is an example of a valid Job resource definition:
1238 Level = Incremental # default
1240 FileSet="Minou Full Set"
1243 Schedule = "MinouWeeklyCycle"
1249 \subsection*{The JobDefs Resource}
1250 \label{JobDefsResource}
1251 \index[general]{JobDefs Resource}
1252 \index[general]{Resource!JobDefs}
1253 \addcontentsline{toc}{subsection}{JobDefs Resource}
1255 The JobDefs resource permits all the same directives that can appear in a Job
1256 resource. However, a JobDefs resource does not create a Job, rather it can be
1257 referenced within a Job to provide defaults for that Job. This permits you to
1258 concisely define several nearly identical Jobs, each one referencing a JobDefs
1259 resource which contains the defaults. Only the changes from the defaults need to
1260 be mentioned in each Job.
1262 \subsection*{The Schedule Resource}
1263 \label{ScheduleResource}
1264 \index[general]{Resource!Schedule}
1265 \index[general]{Schedule Resource}
1266 \addcontentsline{toc}{subsection}{Schedule Resource}
1268 The Schedule resource provides a means of automatically scheduling a Job as
1269 well as the ability to override the default Level, Pool, Storage and Messages
1270 resources. If a Schedule resource is not referenced in a Job, the Job can only
1271 be run manually. In general, you specify an action to be taken and when.
1276 \index[dir]{Schedule}
1277 Start of the Schedule directives. No {\bf Schedule} resource is required,
1279 you will need at least one if you want Jobs to be automatically started.
1281 \item [Name = \lt{}name\gt{}]
1283 The name of the schedule being defined. The Name directive is required.
1285 \item [Run = \lt{}Job-overrides\gt{} \lt{}Date-time-specification\gt{}]
1287 The Run directive defines when a Job is to be run, and what overrides if any
1288 to apply. You may specify multiple {\bf run} directives within a {\bf
1289 Schedule} resource. If you do, they will all be applied (i.e. multiple
1290 schedules). If you have two {\bf Run} directives that start at the same time,
1291 two Jobs will start at the same time (well, within one second of each
1294 The {\bf Job-overrides} permit overriding the Level, the Storage, the
1295 Messages, and the Pool specifications provided in the Job resource. In
1296 addition, the FullPool, the IncrementalPool, and the DifferentialPool
1297 specifications permit overriding the Pool specification according to what
1298 backup Job Level is in effect.
1300 By the use of overrides, you may customize a particular Job. For example, you
1301 may specify a Messages override for your Incremental backups that outputs
1302 messages to a log file, but for your weekly or monthly Full backups, you may
1303 send the output by email by using a different Messages override.
1305 {\bf Job-overrides} are specified as: {\bf keyword=value} where the keyword
1306 is Level, Storage, Messages, Pool, FullPool, DifferentialPool, or
1307 IncrementalPool, and the {\bf value} is as defined on the respective
1308 directive formats for the Job resource. You may specify multiple {\bf
1309 Job-overrides} on one {\bf Run} directive by separating them with one or more
1310 spaces or by separating them with a trailing comma. For example:
1316 is all files in the FileSet whether or not they have changed.
1318 \item [Level=Incremental]
1320 is all files that have changed since the last backup.
1324 specifies to use the Pool named {\bf Weekly}.
1326 \item [Storage=DLT\_Drive]
1327 \index[dir]{Storage}
1328 specifies to use {\bf DLT\_Drive} for the storage device.
1330 \item [Messages=Verbose]
1331 \index[dir]{Messages}
1332 specifies to use the {\bf Verbose} message resource for the Job.
1334 \item [FullPool=Full]
1335 \index[dir]{FullPool}
1336 specifies to use the Pool named {\bf Full} if the job is a full backup, or
1338 upgraded from another type to a full backup.
1340 \item [DifferentialPool=Differential]
1341 \index[dir]{DifferentialPool}
1342 specifies to use the Pool named {\bf Differential} if the job is a
1343 differential backup.
1345 \item [IncrementalPool=Incremental]
1346 \index[dir]{IncrementalPool}
1347 specifies to use the Pool named {\bf Incremental} if the job is an
1350 \item [SpoolData=yes|no]
1351 \index[dir]{SpoolData}
1352 tells Bacula to request the Storage daemon to spool data to a disk file
1353 before putting it on tape.
1355 \item [WritePartAfterJob=yes|no]
1356 \index[dir]{WritePartAfterJob}
1357 tells Bacula to request the Storage daemon to write the current part file to
1358 the device when the job is finished (see
1359 \ilink{Write Part After Job directive in the Job
1360 resource}{WritePartAfterJob}). Please note, this directive is implemented
1361 only in version 1.37 and later.
1365 {\bf Date-time-specification} determines when the Job is to be run. The
1366 specification is a repetition, and as a default Bacula is set to run a job at
1367 the beginning of the hour of every hour of every day of every week of every
1368 month of every year. This is not normally what you want, so you must specify
1369 or limit when you want the job to run. Any specification given is assumed to
1370 be repetitive in nature and will serve to override or limit the default
1371 repetition. This is done by specifying masks or times for the hour, day of the
1372 month, day of the week, week of the month, week of the year, and month when
1373 you want the job to run. By specifying one or more of the above, you can
1374 define a schedule to repeat at almost any frequency you want.
1376 Basically, you must supply a {\bf month}, {\bf day}, {\bf hour}, and {\bf
1377 minute} the Job is to be run. Of these four items to be specified, {\bf day}
1378 is special in that you may either specify a day of the month such as 1, 2,
1379 ... 31, or you may specify a day of the week such as Monday, Tuesday, ...
1380 Sunday. Finally, you may also specify a week qualifier to restrict the
1381 schedule to the first, second, third, fourth, or fifth week of the month.
1383 For example, if you specify only a day of the week, such as {\bf Tuesday} the
1384 Job will be run every hour of every Tuesday of every Month. That is the {\bf
1385 month} and {\bf hour} remain set to the defaults of every month and all
1388 Note, by default with no other specification, your job will run at the
1389 beginning of every hour. If you wish your job to run more than once in any
1390 given hour, you will need to specify multiple {\bf run} specifications each
1391 with a different minute.
1393 The date/time to run the Job can be specified in the following way in
1400 <week-keyword> = 1st | 2nd | 3rd | 4th | 5th | first |
1401 second | third | forth | fifth
1402 <wday-keyword> = sun | mon | tue | wed | thu | fri | sat |
1403 sunday | monday | tuesday | wednesday |
1404 thursday | friday | saturday
1405 <week-of-year-keyword> = w00 | w01 | ... w52 | w53
1406 <month-keyword> = jan | feb | mar | apr | may | jun | jul |
1407 aug | sep | oct | nov | dec | january |
1408 february | ... | december
1409 <daily-keyword> = daily
1410 <weekly-keyword> = weekly
1411 <monthly-keyword> = monthly
1412 <hourly-keyword> = hourly
1413 <digit> = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
1414 <number> = <digit> | <digit><number>
1415 <12hour> = 0 | 1 | 2 | ... 12
1416 <hour> = 0 | 1 | 2 | ... 23
1417 <minute> = 0 | 1 | 2 | ... 59
1418 <day> = 1 | 2 | ... 31
1419 <time> = <hour>:<minute> |
1420 <12hour>:<minute>am |
1422 <time-spec> = <at-keyword> <time> |
1424 <date-keyword> = <void-keyword> <weekly-keyword>
1425 <day-range> = <day>-<day>
1426 <month-range> = <month-keyword>-<month-keyword>
1427 <wday-range> = <wday-keyword>-<wday-keyword>
1428 <range> = <day-range> | <month-range> |
1430 <date> = <date-keyword> | <day> | <range>
1431 <date-spec> = <date> | <date-spec>
1432 <day-spec> = <day> | <wday-keyword> |
1433 <day-range> | <wday-range> |
1435 <day-spec> = <day> | <wday-keyword> |
1436 <day> | <wday-range> |
1437 <week-keyword> <wday-keyword> |
1438 <week-keyword> <wday-range>
1439 <month-spec> = <month-keyword> | <month-range> |
1441 <date-time-spec> = <month-spec> <day-spec> <time-spec>
1447 Note, the Week of Year specification wnn follows the ISO standard definition
1448 of the week of the year, where Week 1 is the week in which the first Thursday
1449 of the year occurs, or alternatively, the week which contains the 4th of
1450 January. Weeks are numbered w01 to w53. w00 for Bacula is the week that
1451 precedes the first ISO week (i.e. has the first few days of the year if any
1452 occur before Thursday). w00 is not defined by the ISO specification. A week
1453 starts with Monday and ends with Sunday.
1455 An example schedule resource that is named {\bf WeeklyCycle} and runs a job
1456 with level full each Sunday at 1:05am and an incremental job Monday through
1457 Saturday at 1:05am is:
1462 Name = "WeeklyCycle"
1463 Run = Level=Full sun at 1:05
1464 Run = Level=Incremental mon-sat at 1:05
1469 An example of a possible monthly cycle is as follows:
1474 Name = "MonthlyCycle"
1475 Run = Level=Full Pool=Monthly 1st sun at 1:05
1476 Run = Level=Differential 2nd-5th sun at 1:05
1477 Run = Level=Incremental Pool=Daily mon-sat at 1:05
1482 The first of every month:
1488 Run = Level=Full on 1 at 1:05
1489 Run = Level=Incremental on 2-31 at 1:05
1500 Run = Level=Full hourly at 0:05
1501 Run = Level=Full hourly at 0:15
1502 Run = Level=Full hourly at 0:25
1503 Run = Level=Full hourly at 0:35
1504 Run = Level=Full hourly at 0:45
1505 Run = Level=Full hourly at 0:55
1510 \subsection*{Technical Notes on Schedules}
1511 \index[general]{Schedules!Technical Notes on}
1512 \index[general]{Technical Notes on Schedules}
1513 \addcontentsline{toc}{subsection}{Technical Notes on Schedules}
1515 Internally Bacula keeps a schedule as a bit mask. There are six masks and a
1516 minute field to each schedule. The masks are hour, day of the month (mday),
1517 month, day of the week (wday), week of the month (wom), and week of the year
1518 (woy). The schedule is initialized to have the bits of each of these masks
1519 set, which means that at the beginning of every hour, the job will run. When
1520 you specify a month for the first time, the mask will be cleared and the bit
1521 corresponding to your selected month will be selected. If you specify a second
1522 month, the bit corresponding to it will also be added to the mask. Thus when
1523 Bacula checks the masks to see if the bits are set corresponding to the
1524 current time, your job will run only in the two months you have set. Likewise,
1525 if you set a time (hour), the hour mask will be cleared, and the hour you
1526 specify will be set in the bit mask and the minutes will be stored in the
1529 For any schedule you have defined, you can see how these bits are set by doing
1530 a {\bf show schedules} command in the Console program. Please note that the
1531 bit mask is zero based, and Sunday is the first day of the week (bit zero).
1535 \subsection*{The Client Resource}
1536 \label{ClientResource2}
1537 \index[general]{Resource!Client}
1538 \index[general]{Client Resource}
1539 \addcontentsline{toc}{subsection}{Client Resource}
1541 The Client resource defines the attributes of the Clients that are served by
1542 this Director; that is the machines that are to be backed up. You will need
1543 one Client resource definition for each machine to be backed up.
1547 \item [Client (or FileDaemon)]
1548 \index[dir]{Client (or FileDaemon)}
1549 Start of the Client directives.
1551 \item [Name = \lt{}name\gt{}]
1553 The client name which will be used in the Job resource directive or in the
1554 console run command. This directive is required.
1556 \item [Address = \lt{}address\gt{}]
1557 \index[dir]{Address }
1558 Where the address is a host name, a fully qualified domain name, or a
1560 address in dotted quad notation for a Bacula File server daemon. This
1561 directive is required.
1563 \item [FD Port = \lt{}port-number\gt{}]
1564 \index[dir]{FD Port }
1565 Where the port is a port number at which the Bacula File server daemon can
1567 contacted. The default is 9102.
1569 \item [Catalog = \lt{}Catalog-resource-name\gt{}]
1570 \index[dir]{Catalog }
1571 This specifies the name of the catalog resource to be used for this Client.
1572 This directive is required.
1574 \item [Password = \lt{}password\gt{}]
1575 \index[dir]{Password }
1576 This is the password to be used when establishing a connection with the File
1577 services, so the Client configuration file on the machine to be backed up
1578 must have the same password defined for this Director. This directive is
1579 required. If you have either {\bf /dev/random} {\bf bc} on your machine,
1580 Bacula will generate a random password during the configuration process,
1581 otherwise it will be left blank.
1582 \label{FileRetention}
1584 \item [File Retention = \lt{}time-period-specification\gt{}]
1585 \index[dir]{File Retention }
1586 The File Retention directive defines the length of time that Bacula will
1588 File records in the Catalog database. When this time period expires, and if
1589 {\bf AutoPrune} is set to {\bf yes} Bacula will prune (remove) File records
1590 that are older than the specified File Retention period. Note, this affects
1591 only records in the catalog database. It does not affect your archive
1594 File records may actually be retained for a shorter period than you specify
1595 on this directive if you specify either a shorter {\bf Job Retention} or a
1596 shorter {\bf Volume Retention} period. The shortest retention period of the
1597 three takes precedence. The time may be expressed in seconds, minutes,
1598 hours, days, weeks, months, quarters, or years. See the
1599 \ilink{ Configuration chapter}{Time} of this manual for
1600 additional details of time specification.
1602 The default is 60 days.
1603 \label{JobRetention}
1605 \item [Job Retention = \lt{}time-period-specification\gt{}]
1606 \index[dir]{Job Retention }
1607 The Job Retention directive defines the length of time that Bacula will keep
1608 Job records in the Catalog database. When this time period expires, and if
1609 {\bf AutoPrune} is set to {\bf yes} Bacula will prune (remove) Job records
1610 that are older than the specified File Retention period. As with the other
1611 retention periods, this affects only records in the catalog and not data in
1612 your archive backup.
1614 If a Job record is selected for pruning, all associated File and JobMedia
1615 records will also be pruned regardless of the File Retention period set.
1616 As a consequence, you normally will set the File retention period to be
1617 less than the Job retention period. The Job retention period can actually
1618 be less than the value you specify here if you set the {\bf Volume
1619 Retention} directive in the Pool resource to a smaller duration. This is
1620 because the Job retention period and the Volume retention period are
1621 independently applied, so the smaller of the two takes precedence.
1623 The Job retention period is specified as seconds, minutes, hours, days,
1624 weeks, months, quarters, or years. See the
1625 \ilink{ Configuration chapter}{Time} of this manual for
1626 additional details of time specification.
1628 The default is 180 days.
1631 \item [AutoPrune = \lt{}yes|no\gt{}]
1632 \index[dir]{AutoPrune }
1633 If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater)
1634 will automatically apply the File retention period and the Job retention
1635 period for the Client at the end of the Job. If you set {\bf AutoPrune = no},
1636 pruning will not be done, and your Catalog will grow in size each time you
1637 run a Job. Pruning affects only information in the catalog and not data
1638 stored in the backup archives (on Volumes).
1640 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
1641 \index[dir]{Maximum Concurrent Jobs }
1642 where \lt{}number\gt{} is the maximum number of Jobs with the current Client
1643 that can run concurrently. Note, this directive limits only Jobs for Clients
1644 with the same name as the resource in which it appears. Any other
1645 restrictions on the maximum concurrent jobs such as in the Director, Job, or
1646 Storage resources will also apply in addition to any limit specified here.
1647 The default is set to 1, but you may set it to a larger number. We strongly
1648 recommend that you read the WARNING documented under
1649 \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's
1652 \item [*Priority = \lt{}number\gt{}]
1653 \index[dir]{*Priority }
1654 The number specifies the priority of this client relative to other clients
1655 that the Director is processing simultaneously. The priority can range from
1656 1 to 1000. The clients are ordered such that the smaller number priorities
1657 are performed first (not currently implemented).
1660 The following is an example of a valid Client resource definition:
1668 Password = very_good
1673 \subsection*{The Storage Resource}
1674 \label{StorageResource2}
1675 \index[general]{Resource!Storage}
1676 \index[general]{Storage Resource}
1677 \addcontentsline{toc}{subsection}{Storage Resource}
1679 The Storage resource defines which Storage daemons are available for use by
1685 \index[dir]{Storage}
1686 Start of the Storage resources. At least one storage resource must be
1689 \item [Name = \lt{}name\gt{}]
1691 The name of the storage resource. This name appears on the Storage directive
1692 specified in the Job directive and is required.
1694 \item [Address = \lt{}address\gt{}]
1695 \index[dir]{Address }
1696 Where the address is a host name, a {\bf fully qualified domain name}, or an
1697 {\bf IP address}. Please note that the \lt{}address\gt{} as specified here
1698 will be transmitted to the File daemon who will then use it to contact the
1699 Storage daemon. Hence, it is {\bf not}, a good idea to use {\bf localhost} as
1700 the name but rather a fully qualified machine name or an IP address. This
1701 directive is required.
1703 \item [SD Port = \lt{}port\gt{}]
1704 \index[dir]{SD Port }
1705 Where port is the port to use to contact the storage daemon for information
1706 and to start jobs. This same port number must appear in the Storage resource
1707 of the Storage daemon's configuration file. The default is 9103.
1709 \item [Password = \lt{}password\gt{}]
1710 \index[dir]{Password}
1711 This is the password to be used when establishing a connection with the
1712 Storage services. This same password also must appear in the Director
1713 resource of the Storage daemon's configuration file. This directive is
1714 required. If you have either {\bf /dev/random} {\bf bc} on your machine,
1715 Bacula will generate a random password during the configuration process,
1716 otherwise it will be left blank.
1718 \item [Device = \lt{}device-name\gt{}]
1720 This directive specifies the name of the device to be used for the
1721 storage. This name is not the physical device name, but the logical
1722 device name as defined on the {\bf Name} directive contained in the {\bf
1723 Device} resource definition of the {\bf Storage daemon} configuration
1724 file or if the device is an Autochanger, you must put the name as
1725 defined on the {\bf Name} directive contained in the {\bf Autochanger}
1726 resource definition of the {\bf Storage daemon}. You can specify any
1727 name you would like (even the device name if you prefer) up to a maximum
1728 of 127 characters in length. The physical device name associated with
1729 this device is specified in the {\bf Storage daemon} configuration file
1730 (as {\bf Archive Device}). Please take care not to define two different
1731 Storage resource directives in the Director that point to the same
1732 Device in the Storage daemon. Doing so may cause the Storage daemon to
1733 block (or hang) attempting to open the same device that is already open.
1734 This directive is required.
1737 \item [Media Type = \lt{}MediaType\gt{}]
1738 \index[dir]{Media Type}
1739 This directive specifies the Media Type to be used to store the data.
1740 This is an arbitrary string of characters up to 127 maximum that you
1741 define. It can be anything you want. However, it is best to make it
1742 descriptive of the storage media (e.g. File, DAT, "HP DLT8000", 8mm,
1743 ...). In addition, it is essential that you make the {\bf Media Type}
1744 specification unique for each storage media type. If you have two DDS-4
1745 drives that have incompatible formats, or if you have a DDS-4 drive and
1746 a DDS-4 autochanger, you almost certainly should specify different {\bf
1747 Media Types}. During a restore, assuming a {\bf DDS-4} Media Type is
1748 associated with the Job, Bacula can decide to use any Storage daemon
1749 that supports Media Type {\bf DDS-4} and on any drive that supports it.
1751 If you want to tie Bacula to using a single Storage daemon or drive, you
1752 must specify a unique Media Type for that drive. This is an important
1753 point that should be carefully understood. Note, this applies equally
1754 to Disk Volumes. If you define more than one disk Device resource in
1755 your Storage daemon's conf file, the Volumes on those two devices are in
1756 fact incompatible because one can not be mounted on the other device
1757 since they are found in different directories. For this reason, you
1758 probably should use two different Media Types for your two disk Devices
1759 (even though you might think of them as both being File types). You can
1760 find more on this subject in the \ilink{Basic Volume
1761 Management}{_ChapterStart39} chapter of this manual.
1763 The {\bf MediaType} specified here, {\bf must} correspond to the {\bf
1764 Media Type} specified in the {\bf Device} resource of the {\bf Storage
1765 daemon} configuration file. This directive is required, and it is used
1766 by the Director and the Storage daemon to ensure that a Volume
1767 automatically selected from the Pool corresponds to the physical device.
1768 If a Storage daemon handles multiple devices (e.g. will write to
1769 various file Volumes on different partitions), this directive allows you
1770 to specify exactly which device.
1772 As mentioned above, the value specified in the Director's Storage resource
1773 must agree with the value specified in the Device resource in the {\bf
1774 Storage daemon's} configuration file. It is also an additional check so that
1775 you don't try to write data for a DLT onto an 8mm device.
1777 \label{Autochanger1}
1778 \item [Autochanger = \lt{}yes|no\gt{}]
1779 \index[dir]{Autochanger }
1780 If you specify {\bf yes} for this command (the default is {\bf no}), when
1781 you use the {\bf label} command or the {\bf add} command to create a new
1782 Volume, {\bf Bacula} will also request the Autochanger Slot number.
1783 This simplifies creating database entries for Volumes in an autochanger.
1784 If you forget to specify the Slot, the autochanger will not be used.
1785 However, you may modify the Slot associated with a Volume at any time by
1786 using the {\bf update volume} command in the console program. When {\bf
1787 autochanger} is enabled, the algorithm used by Bacula to search for
1788 available volumes will be modified to consider only Volumes that are
1789 known to be in the autochanger's magazine. If no {\bf in changer}
1790 volume is found, Bacula will attempt recycling, pruning, ..., and if
1791 still no volume is found, Bacula will search for any volume whether or
1792 not in the magazine. By privileging in changer volumes, this procedure
1793 minimizes operator intervention. The default is {\bf no}.
1795 For the autochanger to be used, you must also specify {\bf Autochanger =
1796 yes} in the \ilink{Device Resource}{Autochanger} in the Storage daemon's
1797 configuration file as well as other important Storage daemon
1798 configuration information. Please consult the \ilink{Using
1799 Autochangers}{_ChapterStart18} manual of this chapter for the details of
1802 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
1803 \index[dir]{Maximum Concurrent Jobs }
1804 where \lt{}number\gt{} is the maximum number of Jobs with the current
1806 resource that can run concurrently. Note, this directive limits only Jobs
1807 for Jobs using this Storage daemon. Any other restrictions on the maximum
1808 concurrent jobs such as in the Director, Job, or Client resources will also
1809 apply in addition to any limit specified here. The default is set to 1, but
1810 you may set it to a larger number. We strongly recommend that you read the
1811 WARNING documented under
1812 \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's
1815 While it is possible to set the Director's, Job's, or Client's maximum
1816 concurrent jobs greater than one, you should take great care in setting the
1817 Storage daemon's greater than one. By keeping this directive set to one, you
1818 will avoid having two jobs simultaneously write to the same Volume. Although
1819 this is supported, it is not currently recommended.
1822 The following is an example of a valid Storage resource definition:
1826 # Definition of tape storage device
1830 Password = storage_password # password for Storage daemon
1831 Device = "HP DLT 80" # same as Device in Storage daemon
1832 Media Type = DLT8000 # same as MediaType in Storage daemon
1837 \subsection*{The Pool Resource}
1838 \label{PoolResource}
1839 \index[general]{Resource!Pool}
1840 \index[general]{Pool Resource}
1841 \addcontentsline{toc}{subsection}{Pool Resource}
1843 The Pool resource defines the set of storage Volumes (tapes or files) to be
1844 used by Bacula to write the data. By configuring different Pools, you can
1845 determine which set of Volumes (media) receives the backup data. This permits,
1846 for example, to store all full backup data on one set of Volumes and all
1847 incremental backups on another set of Volumes. Alternatively, you could assign
1848 a different set of Volumes to each machine that you backup. This is most
1849 easily done by defining multiple Pools.
1851 Another important aspect of a Pool is that it contains the default attributes
1852 (Maximum Jobs, Retention Period, Recycle flag, ...) that will be given to a
1853 Volume when it is created. This avoids the need for you to answer a large
1854 number of questions when labeling a new Volume. Each of these attributes can
1855 later be changed on a Volume by Volume basis using the {\bf update} command in
1856 the console program. Note that you must explicitly specify which Pool Bacula
1857 is to use with each Job. Bacula will not automatically search for the correct
1860 Most often in Bacula installations all backups for all machines (Clients) go
1861 to a single set of Volumes. In this case, you will probably only use the {\bf
1862 Default} Pool. If your backup strategy calls for you to mount a different tape
1863 each day, you will probably want to define a separate Pool for each day. For
1864 more information on this subject, please see the
1865 \ilink{Backup Strategies}{_ChapterStart3} chapter of this
1869 To use a Pool, there are three distinct steps. First the Pool must be defined
1870 in the Director's configuration file. Then the Pool must be written to the
1871 Catalog database. This is done automatically by the Director each time that it
1872 starts, or alternatively can be done using the {\bf create} command in the
1873 console program. Finally, if you change the Pool definition in the Director's
1874 configuration file and restart Bacula, the pool will be updated alternatively
1875 you can use the {\bf update pool} console command to refresh the database
1876 image. It is this database image rather than the Director's resource image
1877 that is used for the default Volume attributes. Note, for the pool to be
1878 automatically created or updated, it must be explicitly referenced by a Job
1881 Next the physical media must be labeled. The labeling can either be done with
1882 the {\bf label} command in the {\bf console} program or using the {\bf btape}
1883 program. The preferred method is to use the {\bf label} command in the {\bf
1886 Finally, you must add Volume names (and their attributes) to the Pool. For
1887 Volumes to be used by Bacula they must be of the same {\bf Media Type} as the
1888 archive device specified for the job (i.e. if you are going to back up to a
1889 DLT device, the Pool must have DLT volumes defined since 8mm volumes cannot be
1890 mounted on a DLT drive). The {\bf Media Type} has particular importance if you
1891 are backing up to files. When running a Job, you must explicitly specify which
1892 Pool to use. Bacula will then automatically select the next Volume to use from
1893 the Pool, but it will ensure that the {\bf Media Type} of any Volume selected
1894 from the Pool is identical to that required by the Storage resource you have
1895 specified for the Job.
1897 If you use the {\bf label} command in the console program to label the
1898 Volumes, they will automatically be added to the Pool, so this last step is
1899 not normally required.
1901 It is also possible to add Volumes to the database without explicitly labeling
1902 the physical volume. This is done with the {\bf add} console command.
1904 As previously mentioned, each time Bacula starts, it scans all the Pools
1905 associated with each Catalog, and if the database record does not already
1906 exist, it will be created from the Pool Resource definition. {\bf Bacula}
1907 probably should do an {\bf update pool} if you change the Pool definition, but
1908 currently, you must do this manually using the {\bf update pool} command in
1909 the Console program.
1911 The Pool Resource defined in the Director's configuration file
1912 (bacula-dir.conf) may contain the following directives:
1918 Start of the Pool resource. There must be at least one Pool resource
1922 \item [Name = \lt{}name\gt{}]
1924 The name of the pool. For most applications, you will use the default
1925 pool name {\bf Default}. This directive is required.
1928 \item [Maximum Volumes = \lt{}number\gt{}]
1929 \index[dir]{Maximum Volumes }
1930 This directive specifies the maximum number of volumes (tapes or files)
1931 contained in the pool. This directive is optional, if omitted or set to
1932 zero, any number of volumes will be permitted. In general, this
1933 directive is useful for Autochangers where there is a fixed number of
1934 Volumes, or for File storage where you wish to ensure that the backups
1935 made to disk files do not become too numerous or consume too much space.
1937 \item [Pool Type = \lt{}type\gt{}]
1938 \index[dir]{Pool Type }
1939 This directive defines the pool type, which corresponds to the type of
1940 Job being run. It is required and may be one of the following:
1951 \item [Use Volume Once = \lt{}yes|no\gt{}]
1952 \index[dir]{Use Volume Once }
1953 This directive if set to {\bf yes} specifies that each volume is to be
1954 used only once. This is most useful when the Media is a file and you
1955 want a new file for each backup that is done. The default is {\bf no}
1956 (i.e. use volume any number of times). This directive will most likely
1957 be phased out (deprecated), so you are recommended to use {\bf Maximum
1958 Volume Jobs = 1} instead.
1960 The value defined by this directive in the bacula-dir.conf file is the
1961 default value used when a Volume is created. Once the volume is
1962 created, changing the value in the bacula-dir.conf file will not change
1963 what is stored for the Volume. To change the value for an existing
1964 Volume you must use the {\bf update} command in the Console.
1966 \item [Maximum Volume Jobs = \lt{}positive-integer\gt{}]
1967 \index[dir]{Maximum Volume Jobs }
1968 This directive specifies the maximum number of Jobs that can be written
1969 to the Volume. If you specify zero (the default), there is no limit.
1970 Otherwise, when the number of Jobs backed up to the Volume equals {\bf
1971 positive-integer} the Volume will be marked {\bf Used}. When the Volume
1972 is marked {\bf Used} it can no longer be used for appending Jobs, much
1973 like the {\bf Full} status but it can be recycled if recycling is
1974 enabled, and thus used again. By setting {\bf MaximumVolumeJobs} to
1975 one, you get the same effect as setting {\bf UseVolumeOnce = yes}.
1977 The value defined by this directive in the bacula-dir.conf
1978 file is the default value used when a Volume is created. Once the volume is
1979 created, changing the value in the bacula-dir.conf file will not change what
1980 is stored for the Volume. To change the value for an existing Volume you
1981 must use the {\bf update} command in the Console.
1983 \item [Maximum Volume Files = \lt{}positive-integer\gt{}]
1984 \index[dir]{Maximum Volume Files }
1985 This directive specifies the maximum number of files that can be written
1986 to the Volume. If you specify zero (the default), there is no limit.
1987 Otherwise, when the number of files written to the Volume equals {\bf
1988 positive-integer} the Volume will be marked {\bf Used}. When the Volume
1989 is marked {\bf Used} it can no longer be used for appending Jobs, much
1990 like the {\bf Full} status but it can be recycled if recycling is
1991 enabled and thus used again. This value is checked and the {\bf Used}
1992 status is set only at the end of a job that writes to the particular
1995 The value defined by this directive in the bacula-dir.conf file is the
1996 default value used when a Volume is created. Once the volume is
1997 created, changing the value in the bacula-dir.conf file will not change
1998 what is stored for the Volume. To change the value for an existing
1999 Volume you must use the {\bf update} command in the Console.
2001 \item [Maximum Volume Bytes = \lt{}size\gt{}]
2002 \index[dir]{Maximum Volume Bytes }
2003 This directive specifies the maximum number of bytes that can be written
2004 to the Volume. If you specify zero (the default), there is no limit
2005 except the physical size of the Volume. Otherwise, when the number of
2006 bytes written to the Volume equals {\bf size} the Volume will be marked
2007 {\bf Used}. When the Volume is marked {\bf Used} it can no longer be
2008 used for appending Jobs, much like the {\bf Full} status but it can be
2009 recycled if recycling is enabled, and thus the Volume can be re-used
2010 after recycling. This value is checked and the {\bf Used} status set
2011 while the job is writing to the particular volume.
2013 The value defined by this directive in the bacula-dir.conf file is the
2014 default value used when a Volume is created. Once the volume is
2015 created, changing the value in the bacula-dir.conf file will not change
2016 what is stored for the Volume. To change the value for an existing
2017 Volume you must use the {\bf update} command in the Console.
2019 \item [Volume Use Duration = \lt{}time-period-specification\gt{}]
2020 \index[dir]{Volume Use Duration }
2021 The Volume Use Duration directive defines the time period that the
2022 Volume can be written beginning from the time of first data write to the
2023 Volume. If the time-period specified is zero (the default), the Volume
2024 can be written indefinitely. Otherwise, when the time period from the
2025 first write to the volume (the first Job written) exceeds the
2026 time-period-specification, the Volume will be marked {\bf Used}, which
2027 means that no more Jobs can be appended to the Volume, but it may be
2028 recycled if recycling is enabled. Once the Volume is
2029 recycled, it will be available for use again.
2031 You might use this directive, for example, if you have a Volume used for
2032 Incremental backups, and Volumes used for Weekly Full backups. Once the
2033 Full backup is done, you will want to use a different Incremental
2034 Volume. This can be accomplished by setting the Volume Use Duration for
2035 the Incremental Volume to six days. I.e. it will be used for the 6
2036 days following a Full save, then a different Incremental volume will be
2037 used. Be careful about setting the duration to short periods such as 23
2038 hours, or you might experience problems of Bacula waiting for a tape
2039 over the weekend only to complete the backups Monday morning when an
2040 operator mounts a new tape.
2042 The use duration is checked and the {\bf Used} status is set only at the
2043 end of a job that writes to the particular volume, which means that even
2044 though the use duration may have expired, the catalog entry will not be
2045 updated until the next job that uses this volume is run.
2047 Please note that the value defined by this directive in the bacula-dir.conf
2048 file is the default value used when a Volume is created. Once the volume is
2049 created, changing the value in the bacula-dir.conf file will not change what
2050 is stored for the Volume. To change the value for an existing Volume you
2052 \ilink{\bf update volume}{UpdateCommand} command in the Console.
2054 \item [Catalog Files = \lt{}yes|no\gt{}]
2055 \index[dir]{Catalog Files }
2056 This directive defines whether or not you want the names of the files
2057 that were saved to be put into the catalog. The default is {\bf yes}.
2058 The advantage of specifying {\bf Catalog Files = No} is that you will
2059 have a significantly smaller Catalog database. The disadvantage is that
2060 you will not be able to produce a Catalog listing of the files backed up
2061 for each Job (this is often called Browsing). Also, without the File
2062 entries in the catalog, you will not be able to use the Console {\bf
2063 restore} command nor any other command that references File entries.
2065 \label{PoolAutoPrune}
2066 \item [AutoPrune = \lt{}yes|no\gt{}]
2067 \index[dir]{AutoPrune }
2068 If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater)
2069 will automatically apply the Volume Retention period when new Volume is
2070 needed and no appendable Volumes exist in the Pool. Volume pruning causes
2071 expired Jobs (older than the {\bf Volume Retention} period) to be deleted
2072 from the Catalog and permits possible recycling of the Volume.
2074 \label{VolRetention}
2075 \item [Volume Retention = \lt{}time-period-specification\gt{}]
2076 \index[dir]{Volume Retention }
2077 The Volume Retention directive defines the length of time that {\bf
2078 Bacula} will keep Job records associated with the Volume in the Catalog
2079 database. When this time period expires, and if {\bf AutoPrune} is set
2080 to {\bf yes} Bacula may prune (remove) Job records that are older than
2081 the specified Volume Retention period if it is necessary to free up a
2082 Volume. Recycling will not occur until it is absolutely necessary to
2083 free up a volume. All File records associated with pruned Jobs are also
2084 pruned. The time may be specified as seconds, minutes, hours, days,
2085 weeks, months, quarters, or years. The {\bf Volume Retention} is
2086 applied independently of the {\bf Job Retention} and the {\bf File
2087 Retention} periods defined in the Client resource. This means that all
2088 the retentions periods are applied in turn and that the shorter period
2089 is the one that effectively takes precedence. Note, that when the {\bf
2090 Volume Retention} period has been reached, and it is necessary to obtain
2091 a new volume, Bacula will prune both the Job and the File records.
2093 It is important to know that when the Volume Retention period expires,
2094 Bacula does not automatically recycle a Volume. It attempts to keep the
2095 Volume data intact as long as possible before over writing the Volume.
2097 The default Volume retention period is 365 days. Note, this directive
2098 sets the default value for each Volume entry in the Catalog when the
2099 Volume is created. The value in the catalog may be later individually
2100 changed for each Volume using the Console program.
2102 By defining multiple Pools with different Volume Retention periods, you
2103 may effectively have a set of tapes that is recycled weekly, another
2104 Pool of tapes that is recycled monthly and so on. However, one must
2105 keep in mind that if your {\bf Volume Retention} period is too short, it
2106 may prune the last valid Full backup, and hence until the next Full
2107 backup is done, you will not have a complete backup of your system, and
2108 in addition, the next Incremental or Differential backup will be
2109 promoted to a Full backup. As a consequence, the minimum {\bf Volume
2110 Retention} period should be at twice the interval of your Full backups.
2111 This means that if you do a Full backup once a month, the minimum Volume
2112 retention period should be two months.
2114 Please note that the value defined by this directive in the bacula-dir.conf
2115 file is the default value used when a Volume is created. Once the volume is
2116 created, changing the value in the bacula-dir.conf file will not change what
2117 is stored for the Volume. To change the value for an existing Volume you
2118 must use the {\bf update} command in the Console.
2121 \item [Recycle = \lt{}yes|no\gt{}]
2122 \index[dir]{Recycle }
2123 This directive specifies whether or not Purged Volumes may be recycled.
2124 If it is set to {\bf yes} (default) and Bacula needs a volume but finds
2125 none that are appendable, it will search for and recycle (reuse) Purged
2126 Volumes (i.e. volumes with all the Jobs and Files expired and thus
2127 deleted from the Catalog). If the Volume is recycled, all previous data
2128 written to that Volume will be overwritten. If Recycle is set to {\bf
2129 no}, the Volume will not be recycled, and hence, the data will remain
2130 valid. If you want to reuse (re-write) the Volume, and the recycle flag
2131 is no (0 in the catalog), you may manually set the recycle flag (update
2132 command) for a Volume to be reused.
2134 Please note that the value defined by this directive in the
2135 bacula-dir.conf file is the default value used when a Volume is created.
2136 Once the volume is created, changing the value in the bacula-dir.conf
2137 file will not change what is stored for the Volume. To change the value
2138 for an existing Volume you must use the {\bf update} command in the
2141 \label{RecycleOldest}
2142 \item [Recycle Oldest Volume = \lt{}yes|no\gt{}]
2143 \index[dir]{Recycle Oldest Volume }
2144 This directive instructs the Director to search for the oldest used
2145 Volume in the Pool when another Volume is requested by the Storage
2146 daemon and none are available. The catalog is then {\bf pruned}
2147 respecting the retention periods of all Files and Jobs written to this
2148 Volume. If all Jobs are pruned (i.e. the volume is Purged), then the
2149 Volume is recycled and will be used as the next Volume to be written.
2150 This directive respects any Job, File, or Volume retention periods that
2151 you may have specified, and as such it is {\bf much} better to use this
2152 directive than the Purge Oldest Volume.
2154 This directive can be useful if you have a fixed number of Volumes in the
2155 Pool and you want to cycle through them and you have specified the correct
2158 However, if you use this directive and have only one
2159 Volume in the Pool, you will immediately recycle your Volume if you fill
2160 it and Bacula needs another one. Thus your backup will be totally invalid.
2161 Please use this directive with care. The default is {\bf no}.
2163 \label{RecycleCurrent}
2165 \item [Recycle Current Volume = \lt{}yes|no\gt{}]
2166 \index[dir]{Recycle Current Volume }
2167 If Bacula needs a new Volume, this directive instructs Bacula to Prune
2168 the volume respecting the Job and File retention periods. If all Jobs
2169 are pruned (i.e. the volume is Purged), then the Volume is recycled and
2170 will be used as the next Volume to be written. This directive respects
2171 any Job, File, or Volume retention periods that you may have specified,
2172 and thus it is {\bf much} better to use it rather than the Purge Oldest
2175 This directive can be useful if you have: a fixed number of Volumes in
2176 the Pool, you want to cycle through them, and you have specified
2177 retention periods that prune Volumes before you have cycled through the
2180 However, if you use this directive and have only one Volume in the Pool,
2181 you will immediately recycle your Volume if you fill it and Bacula needs
2182 another one. Thus your backup will be totally invalid. Please use this
2183 directive with care. The default is {\bf no}.
2187 \item [Purge Oldest Volume = \lt{}yes|no\gt{}]
2188 \index[dir]{Purge Oldest Volume }
2189 This directive instructs the Director to search for the oldest used
2190 Volume in the Pool when another Volume is requested by the Storage
2191 daemon and none are available. The catalog is then {\bf purged}
2192 irrespective of retention periods of all Files and Jobs written to this
2193 Volume. The Volume is then recycled and will be used as the next Volume
2194 to be written. This directive overrides any Job, File, or Volume
2195 retention periods that you may have specified.
2197 This directive can be useful if you have a fixed number of Volumes in
2198 the Pool and you want to cycle through them and reusing the oldest one
2199 when all Volumes are full, but you don't want to worry about setting
2200 proper retention periods. However, by using this option you risk losing
2203 Please be aware that {\bf Purge Oldest Volume} disregards all retention
2204 periods. If you have only a single Volume defined and you turn this
2205 variable on, that Volume will always be immediately overwritten when it
2206 fills! So at a minimum, ensure that you have a decent number of Volumes
2207 in your Pool before running any jobs. If you want retention periods to
2208 apply do not use this directive. To specify a retention period, use the
2209 {\bf Volume Retention} directive (see above).
2211 We {\bf highly} recommend against using this directive, because it is
2212 sure that some day, Bacula will recycle a Volume that contains current
2213 data. The default is {\bf no}.
2215 \item [Cleaning Prefix = \lt{}string\gt{}]
2216 \index[dir]{Cleaning Prefix }
2217 This directive defines a prefix string, which if it matches the
2218 beginning of a Volume name during labeling of a Volume, the Volume will
2219 be defined with the VolStatus set to {\bf Cleaning} and thus Bacula will
2220 never attempt to use this tape. This is primarily for use with
2221 autochangers that accept barcodes where the convention is that barcodes
2222 beginning with {\bf CLN} are treated as cleaning tapes.
2225 \item [Label Format = \lt{}format\gt{}]
2226 \index[dir]{Label Format }
2227 This directive specifies the format of the labels contained in this
2228 pool. The format directive is used as a sort of template to create new
2229 Volume names during automatic Volume labeling.
2231 The {\bf format} should be specified in double quotes, and consists of
2232 letters, numbers and the special characters hyphen ({\bf -}), underscore
2233 ({\bf \_}), colon ({\bf :}), and period ({\bf .}), which are the legal
2234 characters for a Volume name. The {\bf format} should be enclosed in
2237 In addition, the format may contain a number of variable expansion
2238 characters which will be expanded by a complex algorithm allowing you to
2239 create Volume names of many different formats. In all cases, the
2240 expansion process must resolve to the set of characters noted above that
2241 are legal Volume names. Generally, these variable expansion characters
2242 begin with a dollar sign ({\bf \$}) or a left bracket ({\bf [}). If you
2243 specify variable expansion characters, you should always enclose the
2244 format with double quote characters ({\bf "}). For more details on
2245 variable expansion, please see the \ilink{Variable
2246 Expansion}{_ChapterStart50} Chapter of this manual.
2248 If no variable expansion characters are found in the string, the Volume
2249 name will be formed from the {\bf format} string appended with the
2250 number of volumes in the pool plus one, which will be edited as four
2251 digits with leading zeros. For example, with a {\bf Label Format =
2252 "File-"}, the first volumes will be named {\bf File-0001}, {\bf
2255 With the exception of Job specific variables, you can test your {\bf
2256 LabelFormat} by using the \ilink{ var command}{var} the Console Chapter
2259 In almost all cases, you should enclose the format specification (part
2260 after the equal sign) in double quotes. Please note that this directive
2261 is deprecated and is replaced in version 1.37 and greater with a Python
2262 script for creating volume names.
2266 In order for a Pool to be used during a Backup Job, the Pool must have at
2267 least one Volume associated with it. Volumes are created for a Pool using
2268 the {\bf label} or the {\bf add} commands in the {\bf Bacula Console},
2269 program. In addition to adding Volumes to the Pool (i.e. putting the
2270 Volume names in the Catalog database), the physical Volume must be labeled
2271 with a valid Bacula software volume label before {\bf Bacula} will accept
2272 the Volume. This will be automatically done if you use the {\bf label}
2273 command. Bacula can automatically label Volumes if instructed to do so,
2274 but this feature is not yet fully implemented.
2276 The following is an example of a valid Pool resource definition:
2288 \subsubsection*{The Scratch Pool}
2289 \addcontentsline{toc}{subsection}{Scratch Pool}
2290 \index[general]{Scratch Pool}
2291 In general, you can give your Pools any name you wish, but there is one
2292 important restriction: the Pool named {\bf Scratch}, if it exists behaves
2293 like a scratch pool of Volumes in that when Bacula needs a new Volume for
2294 writing and it cannot find one, it will look in the Scratch pool, and if
2295 it finds an available Volume, it will move it out of the Scratch pool into
2296 the Pool currently being used by the job.
2299 \subsection*{The Catalog Resource}
2300 \label{CatalogResource}
2301 \index[general]{Resource!Catalog}
2302 \index[general]{Catalog Resource}
2303 \addcontentsline{toc}{subsection}{Catalog Resource}
2305 The Catalog Resource defines what catalog to use for the current job.
2306 Currently, Bacula can only handle a single database server (SQLite, MySQL,
2307 PostgreSQL) that is defined when configuring {\bf Bacula}. However, there
2308 may be as many Catalogs (databases) defined as you wish. For example, you
2309 may want each Client to have its own Catalog database, or you may want
2310 backup jobs to use one database and verify or restore jobs to use another
2316 \index[dir]{Catalog}
2317 Start of the Catalog resource. At least one Catalog resource must be
2321 \item [Name = \lt{}name\gt{}]
2323 The name of the Catalog. No necessary relation to the database server
2324 name. This name will be specified in the Client resource directive
2325 indicating that all catalog data for that Client is maintained in this
2326 Catalog. This directive is required.
2328 \item [password = \lt{}password\gt{}]
2329 \index[dir]{password }
2330 This specifies the password to use when logging into the database. This
2331 directive is required.
2333 \item [DB Name = \lt{}name\gt{}]
2334 \index[dir]{DB Name }
2335 This specifies the name of the database. If you use multiple catalogs
2336 (databases), you specify which one here. If you are using an external
2337 database server rather than the internal one, you must specify a name
2338 that is known to the server (i.e. you explicitly created the Bacula
2339 tables using this name. This directive is required.
2341 \item [user = \lt{}user\gt{}]
2343 This specifies what user name to use to log into the database. This
2344 directive is required.
2346 \item [DB Socket = \lt{}socket-name\gt{}]
2347 \index[dir]{DB Socket }
2348 This is the name of a socket to use on the local host to connect to the
2349 database. This directive is used only by MySQL and is ignored by SQLite.
2350 Normally, if neither {\bf DB Socket} or {\bf DB Address} are specified, MySQL
2351 will use the default socket.
2353 \item [DB Address = \lt{}address\gt{}]
2354 \index[dir]{DB Address }
2355 This is the host address of the database server. Normally, you would specify
2356 this instead of {\bf DB Socket} if the database server is on another machine.
2357 In that case, you will also specify {\bf DB Port}. This directive is used
2358 only by MySQL and is ignored by SQLite if provided. This directive is
2361 \item [DB Port = \lt{}port\gt{}]
2362 \index[dir]{DB Port }
2363 This defines the port to be used in conjunction with {\bf DB Address} to
2364 access the database if it is on another machine. This directive is used only
2365 by MySQL and is ignored by SQLite if provided. This directive is optional.
2367 %% \item [Multiple Connections = \lt{}yes|no\gt{}]
2368 %% \index[dir]{Multiple Connections }
2369 %% By default, this directive is set to no. In that case, each job that uses
2371 %% same Catalog will use a single connection to the catalog. It will be shared,
2372 %% and Bacula will allow only one Job at a time to communicate. If you set this
2373 %% directive to yes, Bacula will permit multiple connections to the database,
2374 %% and the database must be multi-thread capable. For SQLite and PostgreSQL,
2375 %% this is no problem. For MySQL, you must be *very* careful to have the
2376 %% multi-thread version of the client library loaded on your system. When this
2377 %% directive is set yes, each Job will have a separate connection to the
2378 %% database, and the database will control the interaction between the
2380 %% Jobs. This can significantly speed up the database operations if you are
2381 %% running multiple simultaneous jobs. In addition, for SQLite and PostgreSQL,
2382 %% Bacula will automatically enable transactions. This can significantly speed
2383 %% up insertion of attributes in the database either for a single Job or
2384 %% multiple simultaneous Jobs.
2386 %% This directive has not been tested. Please test carefully before running it
2387 %% in production and report back your results.
2391 The following is an example of a valid Catalog resource definition:
2400 password = "" # no password = no security
2405 or for a Catalog on another machine:
2415 DB Address = remote.acme.com
2421 \subsection*{The Messages Resource}
2422 \label{MessagesResource2}
2423 \index[general]{Resource!Messages}
2424 \index[general]{Messages Resource}
2425 \addcontentsline{toc}{subsection}{Messages Resource}
2427 For the details of the Messages Resource, please see the
2428 \ilink{Messages Resource Chapter}{_ChapterStart15} of this
2431 \subsection*{The Console Resource}
2432 \label{ConsoleResource1}
2433 \index[general]{Console Resource}
2434 \index[general]{Resource!Console}
2435 \addcontentsline{toc}{subsection}{Console Resource}
2437 As of Bacula version 1.33 and higher, there are three different kinds of
2438 consoles, which the administrator or user can use to interact with the
2439 Director. These three kinds of consoles comprise three different security
2443 \item The first console type is an {\bf anonymous} or {\bf default} console,
2444 which has full privileges. There is no console resource necessary for
2445 this type since the password is specified in the Director's resource and
2446 consequently such consoles do not have a name as defined on a {\bf Name
2447 =} directive. This is the kind of console that was initially
2448 implemented in versions prior to 1.33 and remains valid. Typically you
2449 would use it only for administrators.
2451 \item The second type of console, and new to version 1.33 and higher is a
2452 "named" console defined within a Console resource in both the Director's
2453 configuration file and in the Console's configuration file. Both the
2454 names and the passwords in these two entries must match much as is the
2455 case for Client programs.
2457 This second type of console begins with absolutely no privileges except
2458 those explicitly specified in the Director's Console resource. Thus you
2459 can have multiple Consoles with different names and passwords, sort of
2460 like multiple users, each with different privileges. As a default,
2461 these consoles can do absolutely nothing -- no commands whatsoever. You
2462 give them privileges or rather access to commands and resources by
2463 specifying access control lists in the Director's Console resource. The
2464 ACLs are specified by a directive followed by a list of access names.
2465 Examples of this are shown below.
2467 \item The third type of console is similar to the above mentioned one in that
2468 it requires a Console resource definition in both the Director and the
2469 Console. In addition, if the console name, provided on the {\bf Name =}
2470 directive, is the same as a Client name, that console is permitted to
2471 use the {\bf SetIP} command to change the Address directive in the
2472 Director's client resource to the IP address of the Console. This
2473 permits portables or other machines using DHCP (non-fixed IP addresses)
2474 to "notify" the Director of their current IP address.
2477 The Console resource is optional and need not be specified. The following
2478 directives are permitted within the Director's configuration resource:
2482 \item [Name = \lt{}name\gt{}]
2484 The name of the console. This name must match the name specified in the
2485 Console's configuration resource (much as is the case with Client
2488 \item [Password = \lt{}password\gt{}]
2489 \index[dir]{Password }
2490 Specifies the password that must be supplied for a named Bacula Console
2491 to be authorized. The same password must appear in the {\bf Console}
2492 resource of the Console configuration file. For added security, the
2493 password is never actually passed across the network but rather a
2494 challenge response hash code created with the password. This directive
2495 is required. If you have either {\bf /dev/random} {\bf bc} on your
2496 machine, Bacula will generate a random password during the configuration
2497 process, otherwise it will be left blank.
2499 \item [JobACL = \lt{}name-list\gt{}]
2500 \index[dir]{JobACL }
2501 This directive is used to specify a list of Job resource names that can
2502 be accessed by the console. Without this directive, the console cannot
2503 access any of the Director's Job resources. Multiple Job resource names
2504 may be specified by separating them with commas, and/or by specifying
2505 multiple JobACL directives. For example, the directive may be specified
2510 JobACL = kernsave, "Backup client 1", "Backup client 2"
2511 JobACL = "RestoreFiles"
2516 With the above specification, the console can access the Director's resources
2517 for the four jobs named on the JobACL directives, but for no others.
2519 \item [ClientACL = \lt{}name-list\gt{}]
2520 \index[dir]{ClientACL }
2521 This directive is used to specify a list of Client resource names that can
2523 accessed by the console.
2525 \item [StorageACL = \lt{}name-list\gt{}]
2526 \index[dir]{StorageACL }
2527 This directive is used to specify a list of Storage resource names that can
2528 be accessed by the console.
2530 \item [ScheduleACL = \lt{}name-list\gt{}]
2531 \index[dir]{ScheduleACL }
2532 This directive is used to specify a list of Schedule resource names that can
2533 be accessed by the console.
2535 \item [PoolACL = \lt{}name-list\gt{}]
2536 \index[dir]{PoolACL }
2537 This directive is used to specify a list of Pool resource names that can be
2538 accessed by the console.
2540 \item [FileSetACL = \lt{}name-list\gt{}]
2541 \index[dir]{FileSetACL }
2542 This directive is used to specify a list of FileSet resource names that can
2543 be accessed by the console.
2545 \item [CatalogACL = \lt{}name-list\gt{}]
2546 \index[dir]{CatalogACL }
2547 This directive is used to specify a list of Catalog resource names that can
2548 be accessed by the console.
2550 \item [CommandACL = \lt{}name-list\gt{}]
2551 \index[dir]{CommandACL }
2552 This directive is used to specify a list of of console commands that can be
2553 executed by the console.
2556 Aside from Director resource names and console command names, the special
2557 keyword {\bf *all*} can be specified in any of the above access control lists.
2558 When this keyword is present, any resource or command name (which ever is
2559 appropriate) will be accepted. For an example configuration file, please see
2561 \ilink{Console Configuration}{_ChapterStart36} chapter of this
2564 \subsection*{The Counter Resource}
2565 \label{CounterResource}
2566 \index[general]{Resource!Counter}
2567 \index[general]{Counter Resource}
2568 \addcontentsline{toc}{subsection}{Counter Resource}
2570 The Counter Resource defines a counter variable that can be accessed by
2571 variable expansion used for creating Volume labels with the {\bf LabelFormat}
2573 \ilink{LabelFormat}{Label} directive in this chapter for more
2579 \index[dir]{Counter}
2580 Start of the Counter resource. Counter directives are optional.
2582 \item [Name = \lt{}name\gt{}]
2584 The name of the Counter. This is the name you will use in the variable
2585 expansion to reference the counter value.
2587 \item [Minimum = \lt{}integer\gt{}]
2588 \index[dir]{Minimum }
2589 This specifies the minimum value that the counter can have. It also becomes
2590 the default. If not supplied, zero is assumed.
2592 \item [Maximum = \lt{}integer\gt{}]
2593 \index[dir]{Maximum }
2594 This is the maximum value value that the counter can have. If not specified
2595 or set to zero, the counter can have a maximum value of 2,147,483,648 (2 to
2596 the 31 power). When the counter is incremented past this value, it is reset
2599 \item [*WrapCounter = \lt{}counter-name\gt{}]
2600 \index[dir]{*WrapCounter }
2601 If this value is specified, when the counter is incremented past the
2603 and thus reset to the minimum, the counter specified on the {\bf WrapCounter}
2604 is incremented. (This is not currently implemented).
2606 \item [Catalog = \lt{}catalog-name\gt{}]
2607 \index[dir]{Catalog }
2608 If this directive is specified, the counter and its values will be saved in
2609 the specified catalog. If this directive is not present, the counter will be
2610 redefined each time that Bacula is started.
2613 \subsection*{Example Director Configuration File}
2614 \label{SampleDirectorConfiguration}
2615 \index[general]{File!Example Director Configuration}
2616 \index[general]{Example Director Configuration File}
2617 \addcontentsline{toc}{subsection}{Example Director Configuration File}
2619 An example Director configuration file might be the following:
2624 # Default Bacula Director Configuration file
2626 # The only thing that MUST be changed is to add one or more
2627 # file or directory names in the Include directive of the
2630 # For Bacula release 1.15 (5 March 2002) -- redhat
2632 # You might also want to change the default email address
2633 # from root to your address. See the "mail" and "operator"
2634 # directives in the Messages resource.
2636 Director { # define myself
2638 QueryFile = "/home/kern/bacula/bin/query.sql"
2639 WorkingDirectory = "/home/kern/bacula/bin/working"
2640 PidDirectory = "/home/kern/bacula/bin/working"
2641 Password = "XkSfzu/Cf/wX4L8Zh4G4/yhCbpLcz3YVdmVoQvU3EyF/"
2643 # Define the backup Job
2645 Name = "NightlySave"
2647 Level = Incremental # default
2650 Schedule = "WeeklyCycle"
2660 Where = /tmp/bacula-restores
2666 # List of files to be backed up
2670 Options { signature=SHA1 }
2672 # Put your list of files here, one per line or include an
2673 # external list with:
2677 # Note: / backs up everything
2682 # When to do the backups
2684 Name = "WeeklyCycle"
2685 Run = Full sun at 1:05
2686 Run = Incremental mon-sat at 1:05
2688 # Client (File Services) to backup
2693 Password = "MQk6lVinz4GG2hdIZk1dsKE/LxMZGo6znMHiD7t7vzF+"
2694 File Retention = 60d # sixty day file retention
2695 Job Retention = 1y # 1 year Job retention
2696 AutoPrune = yes # Auto apply retention periods
2698 # Definition of DLT tape storage device
2702 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2703 Device = "HP DLT 80" # same as Device in Storage daemon
2704 Media Type = DLT8000 # same as MediaType in Storage daemon
2706 # Definition for a DLT autochanger device
2710 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2711 Device = "Autochanger" # same as Device in Storage daemon
2712 Media Type = DLT-8000 # Different from DLTDrive
2715 # Definition of DDS tape storage device
2719 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2720 Device = SDT-10000 # same as Device in Storage daemon
2721 Media Type = DDS-4 # same as MediaType in Storage daemon
2723 # Definition of 8mm tape storage device
2727 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2728 Device = "Exabyte 8mm"
2731 # Definition of file storage device
2735 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
2736 Device = FileStorage
2739 # Generic catalog service
2742 dbname = bacula; user = bacula; password = ""
2744 # Reasonable message delivery -- send most everything to
2745 # the email address and to the console
2748 mail = root@localhost = all, !skipped, !terminate
2749 operator = root@localhost = mount
2750 console = all, !skipped, !saved
2753 # Default pool definition
2761 # Restricted console used by tray-monitor to get the status of the director
2765 Password = "GN0uRo7PTUmlMbqrJ2Gr1p0fk0HQJTxwnFyE4WSST3MWZseR"
2766 CommandACL = status, .status