4 \chapter{Configuring the Director}
5 \label{DirectorChapter}
6 \index[general]{Director!Configuring the}
7 \index[general]{Configuring the Director}
9 Of all the configuration files needed to run {\bf Bacula}, the Director's is
10 the most complicated, and the one that you will need to modify the most often
11 as you add clients or modify the FileSets.
13 For a general discussion of configuration files and resources including the
14 data types recognized by {\bf Bacula}. Please see the
15 \ilink{Configuration}{ConfigureChapter} chapter of this manual.
17 \section{Director Resource Types}
18 \index[general]{Types!Director Resource}
19 \index[general]{Director Resource Types}
21 Director resource type may be one of the following:
23 Job, JobDefs, Client, Storage, Catalog, Schedule, FileSet, Pool, Director, or
24 Messages. We present them here in the most logical order for defining them:
26 Note, everything revolves around a job and is tied to a job in one
31 \ilink{Director}{DirectorResource4} -- to define the Director's
32 name and its access password used for authenticating the Console program.
33 Only a single Director resource definition may appear in the Director's
34 configuration file. If you have either {\bf /dev/random} or {\bf bc} on your
35 machine, Bacula will generate a random password during the configuration
36 process, otherwise it will be left blank.
38 \ilink{Job}{JobResource} -- to define the backup/restore Jobs
39 and to tie together the Client, FileSet and Schedule resources to be used
40 for each Job. Normally, you will Jobs of different names corresponding
41 to each client (i.e. one Job per client, but a different one with a different name
44 \ilink{JobDefs}{JobDefsResource} -- optional resource for
45 providing defaults for Job resources.
47 \ilink{Schedule}{ScheduleResource} -- to define when a Job is to
48 be automatically run by {\bf Bacula's} internal scheduler. You
49 may have any number of Schedules, but each job will reference only
52 \ilink{FileSet}{FileSetResource} -- to define the set of files
53 to be backed up for each Client. You may have any number of
54 FileSets but each Job will reference only one.
56 \ilink{Client}{ClientResource2} -- to define what Client is to be
57 backed up. You will generally have multiple Client definitions. Each
58 Job will reference only a single client.
60 \ilink{Storage}{StorageResource2} -- to define on what physical
61 device the Volumes should be mounted. You may have one or
62 more Storage definitions.
64 \ilink{Pool}{PoolResource} -- to define the pool of Volumes
65 that can be used for a particular Job. Most people use a
66 single default Pool. However, if you have a large number
67 of clients or volumes, you may want to have multiple Pools.
68 Pools allow you to restrict a Job (or a Client) to use
69 only a particular set of Volumes.
71 \ilink{Catalog}{CatalogResource} -- to define in what database to
72 keep the list of files and the Volume names where they are backed up.
73 Most people only use a single catalog. However, if you want to
74 scale the Director to many clients, multiple catalogs can be helpful.
75 Multiple catalogs require a bit more management because in general
76 you must know what catalog contains what data. Currently, all
77 Pools are defined in each catalog. This restriction will be removed
80 \ilink{Messages}{MessagesChapter} -- to define where error and
81 information messages are to be sent or logged. You may define
82 multiple different message resources and hence direct particular
83 classes of messages to different users or locations (files, ...).
86 \section{The Director Resource}
87 \label{DirectorResource4}
88 \index[general]{Director Resource}
89 \index[general]{Resource!Director}
91 The Director resource defines the attributes of the Directors running on the
92 network. In the current implementation, there is only a single Director
93 resource, but the final design will contain multiple Directors to maintain
94 index and media database redundancy.
100 Start of the Director resource. One and only one director resource must be
103 \item [Name = \lt{}name\gt{}]
105 \index[dir]{Directive!Name}
106 The director name used by the system administrator. This directive is
109 \item [Description = \lt{}text\gt{}]
110 \index[dir]{Description}
111 \index[dir]{Directive!Description}
112 The text field contains a description of the Director that will be displayed
113 in the graphical user interface. This directive is optional.
115 \item [Password = \lt{}UA-password\gt{}]
116 \index[dir]{Password}
117 \index[dir]{Directive!Password}
118 Specifies the password that must be supplied for the default Bacula
119 Console to be authorized. The same password must appear in the {\bf
120 Director} resource of the Console configuration file. For added
121 security, the password is never passed across the network but instead a
122 challenge response hash code created with the password. This directive
123 is required. If you have either {\bf /dev/random} or {\bf bc} on your
124 machine, Bacula will generate a random password during the configuration
125 process, otherwise it will be left blank and you must manually supply
128 The password is plain text. It is not generated through any special
129 process but as noted above, it is better to use random text for
132 \item [Messages = \lt{}Messages-resource-name\gt{}]
133 \index[dir]{Messages}
134 \index[dir]{Directive!Messages}
135 The messages resource specifies where to deliver Director messages that are
136 not associated with a specific Job. Most messages are specific to a job and
137 will be directed to the Messages resource specified by the job. However,
138 there are a few messages that can occur when no job is running. This
139 directive is required.
141 \item [Working Directory = \lt{}Directory\gt{}]
142 \index[dir]{Working Directory}
143 \index[dir]{Directive!Working Directory}
144 This directive is mandatory and specifies a directory in which the Director
145 may put its status files. This directory should be used only by Bacula but
146 may be shared by other Bacula daemons. However, please note, if this
147 directory is shared with other Bacula daemons (the File daemon and Storage
148 daemon), you must ensure that the {\bf Name} given to each daemon is
149 unique so that the temporary filenames used do not collide. By default
150 the Bacula configure process creates unique daemon names by postfixing them
151 with -dir, -fd, and -sd. Standard shell expansion of the {\bf
152 Directory} is done when the configuration file is read so that values such
153 as {\bf \$HOME} will be properly expanded. This directive is required.
154 The working directory specified must already exist and be
155 readable and writable by the Bacula daemon referencing it.
157 If you have specified a Director user and/or a Director group on your
158 ./configure line with {\bf {-}{-}with-dir-user} and/or
159 {\bf {-}{-}with-dir-group} the Working Directory owner and group will
160 be set to those values.
162 \item [Pid Directory = \lt{}Directory\gt{}]
163 \index[dir]{Pid Directory}
164 \index[dir]{Directive!Pid Directory}
165 This directive is mandatory and specifies a directory in which the Director
166 may put its process Id file. The process Id file is used to shutdown
167 Bacula and to prevent multiple copies of Bacula from running simultaneously.
168 Standard shell expansion of the {\bf Directory} is done when the
169 configuration file is read so that values such as {\bf \$HOME} will be
172 The PID directory specified must already exist and be
173 readable and writable by the Bacula daemon referencing it
175 Typically on Linux systems, you will set this to: {\bf /var/run}. If you are
176 not installing Bacula in the system directories, you can use the {\bf Working
177 Directory} as defined above. This directive is required.
179 \item [Scripts Directory = \lt{}Directory\gt{}]
180 \index[dir]{Scripts Directory}
181 \index[dir]{Directive!Scripts Directory}
182 This directive is optional and, if defined, specifies a directory in
183 which the Director will look for the Python startup script {\bf
184 DirStartup.py}. This directory may be shared by other Bacula daemons.
185 Standard shell expansion of the directory is done when the configuration
186 file is read so that values such as {\bf \$HOME} will be properly
189 \item [QueryFile = \lt{}Path\gt{}]
190 \index[dir]{QueryFile}
191 \index[dir]{Directive!QueryFile}
192 This directive is mandatory and specifies a directory and file in which
193 the Director can find the canned SQL statements for the {\bf Query}
194 command of the Console. Standard shell expansion of the {\bf Path} is
195 done when the configuration file is read so that values such as {\bf
196 \$HOME} will be properly expanded. This directive is required.
198 \item [Heartbeat Interval = \lt{}time-interval\gt{}]
199 \index[dir]{Heartbeat Interval}
200 \index[dir]{Directive!Heartbeat}
201 This directive is optional and if specified will cause the Director to
202 set a keepalive interval (heartbeat) in seconds on each of the sockets
203 it opens for the Client resource. This value will override any
204 specified at the Director level. It is implemented only on systems
205 (Linux, ...) that provide the {\bf setsockopt} TCP\_KEEPIDLE function.
206 The default value is zero, which means no change is made to the socket.
208 \label{DirMaxConJobs}
209 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
210 \index[dir]{Maximum Concurrent Jobs}
211 \index[dir]{Directive!Maximum Concurrent Jobs}
212 \index[general]{Simultaneous Jobs}
213 \index[general]{Concurrent Jobs}
214 where \lt{}number\gt{} is the maximum number of total Director Jobs that
215 should run concurrently. The default is set to 1, but you may set it to a
218 Please note that the Volume format becomes much more complicated with
219 multiple simultaneous jobs, consequently, restores can take much longer if
220 Bacula must sort through interleaved volume blocks from multiple simultaneous
221 jobs. This can be avoided by having each simultaneously running job write to
222 a different volume or by using data spooling, which will first spool the data
223 to disk simultaneously, then write each spool file to the volume in
226 There may also still be some cases where directives such as {\bf Maximum
227 Volume Jobs} are not properly synchronized with multiple simultaneous jobs
228 (subtle timing issues can arise), so careful testing is recommended.
230 At the current time, there is no configuration parameter set to limit the
231 number of console connections. A maximum of five simultaneous console
232 connections are permitted.
234 \item [FD Connect Timeout = \lt{}time\gt{}]
235 \index[dir]{FD Connect Timeout}
236 \index[dir]{Directive!FD Connect Timeout}
237 where {\bf time} is the time that the Director should continue
238 attempting to contact the File daemon to start a job, and after which
239 the Director will cancel the job. The default is 30 minutes.
241 \item [SD Connect Timeout = \lt{}time\gt{}]
242 \index[dir]{SD Connect Timeout}
243 \index[dir]{Directive!SD Connect Timeout}
244 where {\bf time} is the time that the Director should continue
245 attempting to contact the Storage daemon to start a job, and after which
246 the Director will cancel the job. The default is 30 minutes.
248 \item [DirAddresses = \lt{}IP-address-specification\gt{}]
249 \index[dir]{DirAddresses}
251 \index[general]{Address}
252 \index[dir]{Directive!DirAddresses}
253 Specify the ports and addresses on which the Director daemon will listen
254 for Bacula Console connections. Probably the simplest way to explain
255 this is to show an example:
260 ip = { addr = 1.2.3.4; port = 1205;}
262 addr = 1.2.3.4; port = http;}
271 ip = { addr = 1.2.3.4 }
272 ip = { addr = 201:220:222::2 }
274 addr = bluedot.thun.net
280 where ip, ip4, ip6, addr, and port are all keywords. Note, that the address
281 can be specified as either a dotted quadruple, or IPv6 colon notation, or as
282 a symbolic name (only in the ip specification). Also, port can be specified
283 as a number or as the mnemonic value from the /etc/services file. If a port
284 is not specified, the default will be used. If an ip section is specified,
285 the resolution can be made either by IPv4 or IPv6. If ip4 is specified, then
286 only IPv4 resolutions will be permitted, and likewise with ip6.
288 Please note that if you use the DirAddresses directive, you must
289 not use either a DirPort or a DirAddress directive in the same
292 \item [DirPort = \lt{}port-number\gt{}]
294 \index[dir]{Directive!DirPort}
295 Specify the port (a positive integer) on which the Director daemon will
296 listen for Bacula Console connections. This same port number must be
297 specified in the Director resource of the Console configuration file. The
298 default is 9101, so normally this directive need not be specified. This
299 directive should not be used if you specify DirAddresses (N.B. plural)
302 \item [DirAddress = \lt{}IP-Address\gt{}]
303 \index[dir]{DirAddress}
304 \index[dir]{Directive!DirAddress}
305 This directive is optional, but if it is specified, it will cause the
306 Director server (for the Console program) to bind to the specified {\bf
307 IP-Address}, which is either a domain name or an IP address specified as a
308 dotted quadruple in string or quoted string format. If this directive is not
309 specified, the Director will bind to any available address (the default).
310 Note, unlike the DirAddresses specification noted above, this directive only
311 permits a single address to be specified. This directive should not be used if you
312 specify a DirAddresses (N.B. plural) directive.
318 The following is an example of a valid Director resource definition:
324 WorkingDirectory = "$HOME/bacula/bin/working"
325 Password = UA_password
326 PidDirectory = "$HOME/bacula/bin/working"
327 QueryFile = "$HOME/bacula/bin/query.sql"
333 \section{The Job Resource}
335 \index[general]{Resource!Job}
336 \index[general]{Job Resource}
338 The Job resource defines a Job (Backup, Restore, ...) that Bacula must
339 perform. Each Job resource definition contains the name of a Client and
340 a FileSet to backup, the Schedule for the Job, where the data
341 are to be stored, and what media Pool can be used. In effect, each Job
342 resource must specify What, Where, How, and When or FileSet, Storage,
343 Backup/Restore/Level, and Schedule respectively. Note, the FileSet must
344 be specified for a restore job for historical reasons, but it is no longer used.
346 Only a single type ({\bf Backup}, {\bf Restore}, ...) can be specified for any
347 job. If you want to backup multiple FileSets on the same Client or multiple
348 Clients, you must define a Job for each one.
350 Note, you define only a single Job to do the Full, Differential, and
351 Incremental backups since the different backup levels are tied together by
352 a unique Job name. Normally, you will have only one Job per Client, but
353 if a client has a really huge number of files (more than several million),
354 you might want to split it into to Jobs each with a different FileSet
355 covering only part of the total files.
362 \index[dir]{Directive!Job}
363 Start of the Job resource. At least one Job resource is required.
365 \item [Name = \lt{}name\gt{}]
367 \index[dir]{Directive!Name}
368 The Job name. This name can be specified on the {\bf Run} command in the
369 console program to start a job. If the name contains spaces, it must be
370 specified between quotes. It is generally a good idea to give your job the
371 same name as the Client that it will backup. This permits easy
372 identification of jobs.
374 When the job actually runs, the unique Job Name will consist of the name you
375 specify here followed by the date and time the job was scheduled for
376 execution. This directive is required.
378 \item [Enabled = \lt{}yes|no\gt{}]
380 \index[dir]{Directive!Enable}
381 This directive allows you to enable or disable automatic execution
382 via the scheduler of a Job.
384 \item [Type = \lt{}job-type\gt{}]
386 \index[dir]{Directive!Type}
387 The {\bf Type} directive specifies the Job type, which may be one of the
388 following: {\bf Backup}, {\bf Restore}, {\bf Verify}, or {\bf Admin}. This
389 directive is required. Within a particular Job Type, there are also Levels
390 as discussed in the next item.
396 Run a backup Job. Normally you will have at least one Backup job for each
397 client you want to save. Normally, unless you turn off cataloging, most all
398 the important statistics and data concerning files backed up will be placed
403 Run a restore Job. Normally, you will specify only one Restore job
404 which acts as a sort of prototype that you will modify using the console
405 program in order to perform restores. Although certain basic
406 information from a Restore job is saved in the catalog, it is very
407 minimal compared to the information stored for a Backup job -- for
408 example, no File database entries are generated since no Files are
411 {\bf Restore} jobs cannot be
412 automatically started by the scheduler as is the case for Backup, Verify
413 and Admin jobs. To restore files, you must use the {\bf restore} command
419 Run a verify Job. In general, {\bf verify} jobs permit you to compare the
420 contents of the catalog to the file system, or to what was backed up. In
421 addition, to verifying that a tape that was written can be read, you can
422 also use {\bf verify} as a sort of tripwire intrusion detection.
426 Run an admin Job. An {\bf Admin} job can be used to periodically run catalog
427 pruning, if you do not want to do it at the end of each {\bf Backup} Job.
428 Although an Admin job is recorded in the catalog, very little data is saved.
433 \item [Level = \lt{}job-level\gt{}]
435 \index[dir]{Directive!Level}
436 The Level directive specifies the default Job level to be run. Each
437 different Job Type (Backup, Restore, ...) has a different set of Levels
438 that can be specified. The Level is normally overridden by a different
439 value that is specified in the {\bf Schedule} resource. This directive
440 is not required, but must be specified either by a {\bf Level} directive
441 or as an override specified in the {\bf Schedule} resource.
443 For a {\bf Backup} Job, the Level may be one of the following:
449 When the Level is set to Full all files in the FileSet whether or not
450 they have changed will be backed up.
453 \index[dir]{Incremental}
454 When the Level is set to Incremental all files specified in the FileSet
455 that have changed since the last successful backup of the the same Job
456 using the same FileSet and Client, will be backed up. If the Director
457 cannot find a previous valid Full backup then the job will be upgraded
458 into a Full backup. When the Director looks for a valid backup record
459 in the catalog database, it looks for a previous Job with:
462 \item The same Job name.
463 \item The same Client name.
464 \item The same FileSet (any change to the definition of the FileSet such as
465 adding or deleting a file in the Include or Exclude sections constitutes a
467 \item The Job was a Full, Differential, or Incremental backup.
468 \item The Job terminated normally (i.e. did not fail or was not canceled).
471 If all the above conditions do not hold, the Director will upgrade the
472 Incremental to a Full save. Otherwise, the Incremental backup will be
473 performed as requested.
475 The File daemon (Client) decides which files to backup for an
476 Incremental backup by comparing start time of the prior Job (Full,
477 Differential, or Incremental) against the time each file was last
478 "modified" (st\_mtime) and the time its attributes were last
479 "changed"(st\_ctime). If the file was modified or its attributes
480 changed on or after this start time, it will then be backed up.
482 Some virus scanning software may change st\_ctime while
483 doing the scan. For example, if the virus scanning program attempts to
484 reset the access time (st\_atime), which Bacula does not use, it will
485 cause st\_ctime to change and hence Bacula will backup the file during
486 an Incremental or Differential backup. In the case of Sophos virus
487 scanning, you can prevent it from resetting the access time (st\_atime)
488 and hence changing st\_ctime by using the {\bf \verb:--:no-reset-atime}
489 option. For other software, please see their manual.
491 When Bacula does an Incremental backup, all modified files that are
492 still on the system are backed up. However, any file that has been
493 deleted since the last Full backup remains in the Bacula catalog, which
494 means that if between a Full save and the time you do a restore, some
495 files are deleted, those deleted files will also be restored. The
496 deleted files will no longer appear in the catalog after doing another
497 Full save. However, to remove deleted files from the catalog during an
498 Incremental backup is quite a time consuming process and not currently
499 implemented in Bacula.
501 In addition, if you move a directory rather than copy it, the files in
502 it do not have their modification time (st\_mtime) or their attribute
503 change time (st\_ctime) changed. As a consequence, those files will
504 probably not be backed up by an Incremental or Differential backup which
505 depend solely on these time stamps. If you move a directory, and wish
506 it to be properly backed up, it is generally preferable to copy it, then
510 \index[dir]{Differential}
511 When the Level is set to Differential
512 all files specified in the FileSet that have changed since the last
513 successful Full backup of the same Job will be backed up.
514 If the Director cannot find a
515 valid previous Full backup for the same Job, FileSet, and Client,
516 backup, then the Differential job will be upgraded into a Full backup.
517 When the Director looks for a valid Full backup record in the catalog
518 database, it looks for a previous Job with:
521 \item The same Job name.
522 \item The same Client name.
523 \item The same FileSet (any change to the definition of the FileSet such as
524 adding or deleting a file in the Include or Exclude sections constitutes a
526 \item The Job was a FULL backup.
527 \item The Job terminated normally (i.e. did not fail or was not canceled).
530 If all the above conditions do not hold, the Director will upgrade the
531 Differential to a Full save. Otherwise, the Differential backup will be
532 performed as requested.
534 The File daemon (Client) decides which files to backup for a
535 differential backup by comparing the start time of the prior Full backup
536 Job against the time each file was last "modified" (st\_mtime) and the
537 time its attributes were last "changed" (st\_ctime). If the file was
538 modified or its attributes were changed on or after this start time, it
539 will then be backed up. The start time used is displayed after the {\bf
540 Since} on the Job report. In rare cases, using the start time of the
541 prior backup may cause some files to be backed up twice, but it ensures
542 that no change is missed. As with the Incremental option, you should
543 ensure that the clocks on your server and client are synchronized or as
544 close as possible to avoid the possibility of a file being skipped.
545 Note, on versions 1.33 or greater Bacula automatically makes the
546 necessary adjustments to the time between the server and the client so
547 that the times Bacula uses are synchronized.
549 When Bacula does a Differential backup, all modified files that are
550 still on the system are backed up. However, any file that has been
551 deleted since the last Full backup remains in the Bacula catalog, which
552 means that if between a Full save and the time you do a restore, some
553 files are deleted, those deleted files will also be restored. The
554 deleted files will no longer appear in the catalog after doing another
555 Full save. However, to remove deleted files from the catalog during a
556 Differential backup is quite a time consuming process and not currently
557 implemented in Bacula. It is, however, a planned future feature.
559 As noted above, if you move a directory rather than copy it, the
560 files in it do not have their modification time (st\_mtime) or
561 their attribute change time (st\_ctime) changed. As a
562 consequence, those files will probably not be backed up by an
563 Incremental or Differential backup which depend solely on these
564 time stamps. If you move a directory, and wish it to be
565 properly backed up, it is generally preferable to copy it, then
566 delete the original. Alternatively, you can move the directory, then
567 use the {\bf touch} program to update the timestamps.
569 Every once and a while, someone asks why we need Differential
570 backups as long as Incremental backups pickup all changed files.
571 There are possibly many answers to this question, but the one
572 that is the most important for me is that a Differential backup
574 all the Incremental and Differential backups since the last Full backup
575 into a single Differential backup. This has two effects: 1. It gives
576 some redundancy since the old backups could be used if the merged backup
577 cannot be read. 2. More importantly, it reduces the number of Volumes
578 that are needed to do a restore effectively eliminating the need to read
579 all the volumes on which the preceding Incremental and Differential
580 backups since the last Full are done.
584 For a {\bf Restore} Job, no level needs to be specified.
586 For a {\bf Verify} Job, the Level may be one of the following:
591 \index[dir]{InitCatalog}
592 does a scan of the specified {\bf FileSet} and stores the file
593 attributes in the Catalog database. Since no file data is saved, you
594 might ask why you would want to do this. It turns out to be a very
595 simple and easy way to have a {\bf Tripwire} like feature using {\bf
596 Bacula}. In other words, it allows you to save the state of a set of
597 files defined by the {\bf FileSet} and later check to see if those files
598 have been modified or deleted and if any new files have been added.
599 This can be used to detect system intrusion. Typically you would
600 specify a {\bf FileSet} that contains the set of system files that
601 should not change (e.g. /sbin, /boot, /lib, /bin, ...). Normally, you
602 run the {\bf InitCatalog} level verify one time when your system is
603 first setup, and then once again after each modification (upgrade) to
604 your system. Thereafter, when your want to check the state of your
605 system files, you use a {\bf Verify} {\bf level = Catalog}. This
606 compares the results of your {\bf InitCatalog} with the current state of
611 Compares the current state of the files against the state previously
612 saved during an {\bf InitCatalog}. Any discrepancies are reported. The
613 items reported are determined by the {\bf verify} options specified on
614 the {\bf Include} directive in the specified {\bf FileSet} (see the {\bf
615 FileSet} resource below for more details). Typically this command will
616 be run once a day (or night) to check for any changes to your system
619 Please note! If you run two Verify Catalog jobs on the same client at
620 the same time, the results will certainly be incorrect. This is because
621 Verify Catalog modifies the Catalog database while running in order to
624 \item [VolumeToCatalog]
625 \index[dir]{VolumeToCatalog}
626 This level causes Bacula to read the file attribute data written to the
627 Volume from the last Job. The file attribute data are compared to the
628 values saved in the Catalog database and any differences are reported.
629 This is similar to the {\bf Catalog} level except that instead of
630 comparing the disk file attributes to the catalog database, the
631 attribute data written to the Volume is read and compared to the catalog
632 database. Although the attribute data including the signatures (MD5 or
633 SHA1) are compared, the actual file data is not compared (it is not in
636 Please note! If you run two Verify VolumeToCatalog jobs on the same
637 client at the same time, the results will certainly be incorrect. This
638 is because the Verify VolumeToCatalog modifies the Catalog database
641 \item [DiskToCatalog]
642 \index[dir]{DiskToCatalog}
643 This level causes Bacula to read the files as they currently are on
644 disk, and to compare the current file attributes with the attributes
645 saved in the catalog from the last backup for the job specified on the
646 {\bf VerifyJob} directive. This level differs from the {\bf Catalog}
647 level described above by the fact that it doesn't compare against a
648 previous Verify job but against a previous backup. When you run this
649 level, you must supply the verify options on your Include statements.
650 Those options determine what attribute fields are compared.
652 This command can be very useful if you have disk problems because it
653 will compare the current state of your disk against the last successful
654 backup, which may be several jobs.
656 Note, the current implementation (1.32c) does not identify files that
660 \item [Verify Job = \lt{}Job-Resource-Name\gt{}]
661 \index[dir]{Verify Job}
662 \index[dir]{Directive!Verify Job}
663 If you run a verify job without this directive, the last job run will be
664 compared with the catalog, which means that you must immediately follow
665 a backup by a verify command. If you specify a {\bf Verify Job} Bacula
666 will find the last job with that name that ran. This permits you to run
667 all your backups, then run Verify jobs on those that you wish to be
668 verified (most often a {\bf VolumeToCatalog}) so that the tape just
671 \item [JobDefs = \lt{}JobDefs-Resource-Name\gt{}]
673 \index[dir]{Directive!JobDefs}
674 If a JobDefs-Resource-Name is specified, all the values contained in the
675 named JobDefs resource will be used as the defaults for the current Job.
676 Any value that you explicitly define in the current Job resource, will
677 override any defaults specified in the JobDefs resource. The use of
678 this directive permits writing much more compact Job resources where the
679 bulk of the directives are defined in one or more JobDefs. This is
680 particularly useful if you have many similar Jobs but with minor
681 variations such as different Clients. A simple example of the use of
682 JobDefs is provided in the default bacula-dir.conf file.
684 \item [Bootstrap = \lt{}bootstrap-file\gt{}]
685 \index[dir]{Bootstrap}
686 \index[dir]{Directive!Bootstrap}
687 The Bootstrap directive specifies a bootstrap file that, if provided,
688 will be used during {\bf Restore} Jobs and is ignored in other Job
689 types. The {\bf bootstrap} file contains the list of tapes to be used
690 in a restore Job as well as which files are to be restored.
691 Specification of this directive is optional, and if specified, it is
692 used only for a restore job. In addition, when running a Restore job
693 from the console, this value can be changed.
695 If you use the {\bf Restore} command in the Console program, to start a
696 restore job, the {\bf bootstrap} file will be created automatically from
697 the files you select to be restored.
699 For additional details of the {\bf bootstrap} file, please see
700 \ilink{Restoring Files with the Bootstrap File}{BootstrapChapter} chapter
703 \label{writebootstrap}
704 \item [Write Bootstrap = \lt{}bootstrap-file-specification\gt{}]
705 \index[dir]{Write Bootstrap}
706 \index[dir]{Directive!Write Bootstrap}
707 The {\bf writebootstrap} directive specifies a file name where Bacula
708 will write a {\bf bootstrap} file for each Backup job run. This
709 directive applies only to Backup Jobs. If the Backup job is a Full
710 save, Bacula will erase any current contents of the specified file
711 before writing the bootstrap records. If the Job is an Incremental
713 save, Bacula will append the current bootstrap record to the end of the
716 Using this feature, permits you to constantly have a bootstrap file that
717 can recover the current state of your system. Normally, the file
718 specified should be a mounted drive on another machine, so that if your
719 hard disk is lost, you will immediately have a bootstrap record
720 available. Alternatively, you should copy the bootstrap file to another
721 machine after it is updated. Note, it is a good idea to write a separate
722 bootstrap file for each Job backed up including the job that backs up
723 your catalog database.
725 If the {\bf bootstrap-file-specification} begins with a vertical bar
726 (|), Bacula will use the specification as the name of a program to which
727 it will pipe the bootstrap record. It could for example be a shell
728 script that emails you the bootstrap record.
730 On versions 1.39.22 or greater, before opening the file or executing the
731 specified command, Bacula performs
732 \ilink{character substitution}{character substitution} like in RunScript
733 directive. To automatically manage your bootstrap files, you can use
734 this in your {\bf JobDefs} resources:
737 Write Bootstrap = "%c_%n.bsr"
742 For more details on using this file, please see the chapter entitled
743 \ilink{The Bootstrap File}{BootstrapChapter} of this manual.
745 \item [Client = \lt{}client-resource-name\gt{}]
747 \index[dir]{Directive!Client}
748 The Client directive specifies the Client (File daemon) that will be used in
749 the current Job. Only a single Client may be specified in any one Job. The
750 Client runs on the machine to be backed up, and sends the requested files to
751 the Storage daemon for backup, or receives them when restoring. For
752 additional details, see the
753 \ilink{Client Resource section}{ClientResource2} of this chapter.
754 This directive is required.
756 \item [FileSet = \lt{}FileSet-resource-name\gt{}]
759 The FileSet directive specifies the FileSet that will be used in the
760 current Job. The FileSet specifies which directories (or files) are to
761 be backed up, and what options to use (e.g. compression, ...). Only a
762 single FileSet resource may be specified in any one Job. For additional
763 details, see the \ilink{FileSet Resource section}{FileSetResource} of
764 this chapter. This directive is required.
766 \item [Messages = \lt{}messages-resource-name\gt{}]
767 \index[dir]{Messages}
768 \index[dir]{Directive!Messages}
769 The Messages directive defines what Messages resource should be used for
770 this job, and thus how and where the various messages are to be
771 delivered. For example, you can direct some messages to a log file, and
772 others can be sent by email. For additional details, see the
773 \ilink{Messages Resource}{MessagesChapter} Chapter of this manual. This
774 directive is required.
776 \item [Pool = \lt{}pool-resource-name\gt{}]
778 \index[dir]{Directive!Pool}
779 The Pool directive defines the pool of Volumes where your data can be
780 backed up. Many Bacula installations will use only the {\bf Default}
781 pool. However, if you want to specify a different set of Volumes for
782 different Clients or different Jobs, you will probably want to use
783 Pools. For additional details, see the \ilink{Pool Resource
784 section}{PoolResource} of this chapter. This directive is required.
786 \item [Full Backup Pool = \lt{}pool-resource-name\gt{}]
787 \index[dir]{Full Backup Pool}
788 \index[dir]{Directive!Full Backup Pool}
789 The {\it Full Backup Pool} specifies a Pool to be used for Full backups.
790 It will override any Pool specification during a Full backup. This
791 directive is optional.
793 \item [Differential Backup Pool = \lt{}pool-resource-name\gt{}]
794 \index[dir]{Differential Backup Pool}
795 \index[dir]{Directive!Differential Backup Pool}
796 The {\it Differential Backup Pool} specifies a Pool to be used for
797 Differential backups. It will override any Pool specification during a
798 Differential backup. This directive is optional.
800 \item [Incremental Backup Pool = \lt{}pool-resource-name\gt{}]
801 \index[dir]{Incremental Backup Pool}
802 \index[dir]{Directive!Incremental Backup Pool}
803 The {\it Incremental Backup Pool} specifies a Pool to be used for
804 Incremental backups. It will override any Pool specification during an
805 Incremental backup. This directive is optional.
807 \item [Schedule = \lt{}schedule-name\gt{}]
808 \index[dir]{Schedule}
809 \index[dir]{Directive!Schedule}
810 The Schedule directive defines what schedule is to be used for the Job.
811 The schedule in turn determines when the Job will be automatically
812 started and what Job level (i.e. Full, Incremental, ...) is to be run.
813 This directive is optional, and if left out, the Job can only be started
814 manually using the Console program. Although you may specify only a
815 single Schedule resource for any one job, the Schedule resource may
816 contain multiple {\bf Run} directives, which allow you to run the Job at
817 many different times, and each {\bf run} directive permits overriding
818 the default Job Level Pool, Storage, and Messages resources. This gives
819 considerable flexibility in what can be done with a single Job. For
820 additional details, see the \ilink{Schedule Resource
821 Chapter}{ScheduleResource} of this manual.
824 \item [Storage = \lt{}storage-resource-name\gt{}]
826 \index[dir]{Directive!Storage}
827 The Storage directive defines the name of the storage services where you
828 want to backup the FileSet data. For additional details, see the
829 \ilink{Storage Resource Chapter}{StorageResource2} of this manual.
830 The Storage resource may also be specified in the Job's Pool resource,
831 in which case the value in the Pool resource overrides any value
832 in the Job. This Storage resource definition is not required by either
833 the Job resource or in the Pool, but it must be specified in
834 one or the other, if not an error will result.
836 \item [Max Start Delay = \lt{}time\gt{}]
837 \index[dir]{Max Start Delay}
838 \index[dir]{Directive!Max Start Delay}
839 The time specifies the maximum delay between the scheduled time and the
840 actual start time for the Job. For example, a job can be scheduled to
841 run at 1:00am, but because other jobs are running, it may wait to run.
842 If the delay is set to 3600 (one hour) and the job has not begun to run
843 by 2:00am, the job will be canceled. This can be useful, for example,
844 to prevent jobs from running during day time hours. The default is 0
845 which indicates no limit.
847 \item [Max Run Time = \lt{}time\gt{}]
848 \index[dir]{Max Run Time}
849 \index[dir]{Directive!Max Run Time}
850 The time specifies the maximum allowed time that a job may run, counted
851 from when the job starts, ({\bf not} necessarily the same as when the
852 job was scheduled). This directive is implemented in version 1.33 and
855 \item [Max Wait Time = \lt{}time\gt{}]
856 \index[dir]{Max Wait Time}
857 \index[dir]{Directive!Max Wait Time}
858 The time specifies the maximum allowed time that a job may block waiting
859 for a resource (such as waiting for a tape to be mounted, or waiting for
860 the storage or file daemons to perform their duties), counted from the
861 when the job starts, ({\bf not} necessarily the same as when the job was
862 scheduled). This directive is implemented only in version 1.33 and
865 \item [Incremental Max Wait Time = \lt{}time\gt{}]
866 \index[dir]{Incremental Max Wait Time}
867 \index[dir]{Directive!Incremental Max Wait Time}
868 The time specifies the maximum allowed time that an Incremental backup
869 job may block waiting for a resource (such as waiting for a tape to be
870 mounted, or waiting for the storage or file daemons to perform their
871 duties), counted from the when the job starts, ({\bf not} necessarily
872 the same as when the job was scheduled). Please note that if there is a
873 {\bf Max Wait Time} it may also be applied to the job.
875 \item [Differential Max Wait Time = \lt{}time\gt{}]
876 \index[dir]{Differential Max Wait Time}
877 \index[dir]{Directive!Differential Max Wait Time}
878 The time specifies the maximum allowed time that a Differential backup
879 job may block waiting for a resource (such as waiting for a tape to be
880 mounted, or waiting for the storage or file daemons to perform their
881 duties), counted from the when the job starts, ({\bf not} necessarily
882 the same as when the job was scheduled). Please note that if there is a
883 {\bf Max Wait Time} it may also be applied to the job.
885 \label{PreferMountedVolumes}
886 \item [Prefer Mounted Volumes = \lt{}yes|no\gt{}]
887 \index[dir]{Prefer Mounted Volumes}
888 \index[dir]{Directive!Prefer Mounted Volumes}
889 If the Prefer Mounted Volumes directive is set to {\bf yes} (default
890 yes), the Storage daemon is requested to select either an Autochanger or
891 a drive with a valid Volume already mounted in preference to a drive
892 that is not ready. This means that all jobs will attempt to append
893 to the same Volume (providing the Volume is appropriate -- right Pool,
894 ... for that job). If no drive with a suitable Volume is available, it
895 will select the first available drive. Note, any Volume that has
896 been requested to be mounted, will be considered valid as a mounted
897 volume by another job. This if multiple jobs start at the same time
898 and they all prefer mounted volumes, the first job will request the
899 mount, and the other jobs will use the same volume.
901 If the directive is set to {\bf no}, the Storage daemon will prefer
902 finding an unused drive, otherwise, each job started will append to the
903 same Volume (assuming the Pool is the same for all jobs). Setting
904 Prefer Mounted Volumes to no can be useful for those sites
905 with multiple drive autochangers that prefer to maximize backup
906 throughput at the expense of using additional drives and Volumes.
907 This means that the job will prefer to use an unused drive rather
908 than use a drive that is already in use.
910 \item [Prune Jobs = \lt{}yes|no\gt{}]
911 \index[dir]{Prune Jobs}
912 \index[dir]{Directive!Prune Jobs}
913 Normally, pruning of Jobs from the Catalog is specified on a Client by
914 Client basis in the Client resource with the {\bf AutoPrune} directive.
915 If this directive is specified (not normally) and the value is {\bf
916 yes}, it will override the value specified in the Client resource. The
920 \item [Prune Files = \lt{}yes|no\gt{}]
921 \index[dir]{Prune Files}
922 \index[dir]{Directive!Prune Files}
923 Normally, pruning of Files from the Catalog is specified on a Client by
924 Client basis in the Client resource with the {\bf AutoPrune} directive.
925 If this directive is specified (not normally) and the value is {\bf
926 yes}, it will override the value specified in the Client resource. The
929 \item [Prune Volumes = \lt{}yes|no\gt{}]
930 \index[dir]{Prune Volumes}
931 \index[dir]{Directive!Prune Volumes}
932 Normally, pruning of Volumes from the Catalog is specified on a Client
933 by Client basis in the Client resource with the {\bf AutoPrune}
934 directive. If this directive is specified (not normally) and the value
935 is {\bf yes}, it will override the value specified in the Client
936 resource. The default is {\bf no}.
938 \item [RunScript \{\lt{}body-of-runscript\gt{}\}]
939 \index[dir]{RunScript}
940 \index[dir]{Directive!Run Script}
942 This directive is implemented in version 1.39.22 and later.
943 The RunScript directive behaves like a resource in that it
944 requires opening and closing braces around a number of directives
945 that make up the body of the runscript.
947 The specified {\bf Command} (see below for details) is run as an
948 external program prior or after the current Job. This is optional.
950 You can use following options may be specified in the body
953 \begin{tabular}{|c|c|c|l}
954 Options & Value & Default & Information \\
957 Runs On Success & Yes/No & {\it Yes} & Run command if JobStatus is successful\\
959 Runs On Failure & Yes/No & {\it No} & Run command if JobStatus isn't successful\\
961 Runs On Client & Yes/No & {\it Yes} & Run command on client\\
963 Runs When & Before|After|Always & {\it Never} & When run commands\\
965 Fail Job On Error & Yes/No & {\it Yes} & Fail job if script returns
966 something different from 0 \\
968 Command & & & Path to your script\\
973 Any output sent by the command to standard output will be included in the
974 Bacula job report. The command string must be a valid program name or name
977 In addition, the command string is parsed then fed to the OS,
978 which means that the path will be searched to execute your specified
979 command, but there is no shell interpretation, as a consequence, if you
980 invoke complicated commands or want any shell features such as redirection
981 or piping, you must call a shell script and do it inside that script.
983 Before submitting the specified command to the operating system, Bacula
984 performs character substitution of the following characters:
986 \label{character substitution}
998 %t = Job type (Backup, ...)
1004 The Job Exit Status code \%e edits the following values:
1006 \index[dir]{Exit Status}
1013 \item Unknown term code
1016 Thus if you edit it on a command line, you will need to enclose
1017 it within some sort of quotes.
1020 You can use these following shortcuts:\\
1022 \begin{tabular}{|c|c|c|c|c|c}
1023 Keyword & RunsOnSuccess & RunsOnFailure & FailJobOnError & Runs On Client & RunsWhen \\
1025 Run Before Job & & & Yes & No & Before \\
1027 Run After Job & Yes & No & & No & After \\
1029 Run After Failed Job & No & Yes & & No & After \\
1031 Client Run Before Job & & & Yes & Yes & Before \\
1033 Client Run After Job & Yes & No & & Yes & After \\
1041 Command = "/etc/init.d/apache stop"
1047 Command = "/etc/init.d/apache start"
1051 {\bf Special Windows Considerations}
1053 In addition, for a Windows client on version 1.33 and above, please take
1054 note that you must ensure a correct path to your script. The script or
1055 program can be a .com, .exe or a .bat file. If you just put the program
1056 name in then Bacula will search using the same rules that cmd.exe uses
1057 (current directory, Bacula bin directory, and PATH). It will even try the
1058 different extensions in the same order as cmd.exe.
1059 The command can be anything that cmd.exe or command.com will recognize
1060 as an executable file.
1062 However, if you have slashes in the program name then Bacula figures you
1063 are fully specifying the name, so you must also explicitly add the three
1064 character extension.
1066 The command is run in a Win32 environment, so Unix like commands will not
1067 work unless you have installed and properly configured Cygwin in addition
1068 to and separately from Bacula.
1070 The System \%Path\% will be searched for the command. (under the
1071 environment variable dialog you have have both System Environment and
1072 User Environment, we believe that only the System environment will be
1073 available to bacula-fd, if it is running as a service.)
1075 System environment variables can be referenced with \%var\% and
1076 used as either part of the command name or arguments.
1078 So if you have a script in the Bacula\\bin directory then the following lines
1083 Client Run Before Job = systemstate
1085 Client Run Before Job = systemstate.bat
1087 Client Run Before Job = "systemstate"
1089 Client Run Before Job = "systemstate.bat"
1091 ClientRunBeforeJob = "\"C:/Program Files/Bacula/systemstate.bat\""
1095 The outer set of quotes is removed when the configuration file is parsed.
1096 You need to escape the inner quotes so that they are there when the code
1097 that parses the command line for execution runs so it can tell what the
1103 ClientRunBeforeJob = "\"C:/Program Files/Software
1104 Vendor/Executable\" /arg1 /arg2 \"foo bar\""
1108 The special characters
1112 will need to be quoted,
1113 if they are part of a filename or argument.
1115 If someone is logged in, a blank "command" window running the commands
1116 will be present during the execution of the command.
1118 Some Suggestions from Phil Stracchino for running on Win32 machines with
1119 the native Win32 File daemon:
1122 \item You might want the ClientRunBeforeJob directive to specify a .bat
1123 file which runs the actual client-side commands, rather than trying
1124 to run (for example) regedit /e directly.
1125 \item The batch file should explicitly 'exit 0' on successful completion.
1126 \item The path to the batch file should be specified in Unix form:
1128 ClientRunBeforeJob = "c:/bacula/bin/systemstate.bat"
1130 rather than DOS/Windows form:
1132 ClientRunBeforeJob =
1134 "c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}systemstate.bat"
1138 For Win32, please note that there are certain limitations:
1140 ClientRunBeforeJob = "C:/Program Files/Bacula/bin/pre-exec.bat"
1142 Lines like the above do not work because there are limitations of
1143 cmd.exe that is used to execute the command.
1144 Bacula prefixes the string you supply with {\bf cmd.exe /c }. To test that
1145 your command works you should type {\bf cmd /c "C:/Program Files/test.exe"} at a
1146 cmd prompt and see what happens. Once the command is correct insert a
1147 backslash (\textbackslash{}) before each double quote ("), and
1148 then put quotes around the whole thing when putting it in
1149 the director's .conf file. You either need to have only one set of quotes
1150 or else use the short name and don't put quotes around the command path.
1152 Below is the output from cmd's help as it relates to the command line
1153 passed to the /c option.
1156 If /C or /K is specified, then the remainder of the command line after
1157 the switch is processed as a command line, where the following logic is
1158 used to process quote (") characters:
1162 If all of the following conditions are met, then quote characters
1163 on the command line are preserved:
1166 \item exactly two quote characters.
1167 \item no special characters between the two quote characters,
1168 where special is one of:
1172 \item there are one or more whitespace characters between the
1173 the two quote characters.
1174 \item the string between the two quote characters is the name
1175 of an executable file.
1178 \item Otherwise, old behavior is to see if the first character is
1179 a quote character and if so, strip the leading character and
1180 remove the last quote character on the command line, preserving
1181 any text after the last quote character.
1186 The following example of the use of the Client Run Before Job directive was
1187 submitted by a user:\\
1188 You could write a shell script to back up a DB2 database to a FIFO. The shell
1198 db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING &
1203 The following line in the Job resource in the bacula-dir.conf file:
1206 Client Run Before Job = "su - mercuryd -c \"/u01/mercuryd/backupdb.sh '%t'
1211 When the job is run, you will get messages from the output of the script
1212 stating that the backup has started. Even though the command being run is
1213 backgrounded with \&, the job will block until the "db2 BACKUP DATABASE"
1214 command, thus the backup stalls.
1216 To remedy this situation, the "db2 BACKUP DATABASE" line should be changed to
1221 db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING > $DIR/backup.log
1226 It is important to redirect the input and outputs of a backgrounded command to
1227 /dev/null to prevent the script from blocking.
1229 \item [Run Before Job = \lt{}command\gt{}]
1230 \index[dir]{Run Before Job}
1231 \index[dir]{Directive!Run Before Job}
1232 \index[dir]{Directive!Run Before Job}
1233 The specified {\bf command} is run as an external program prior to running the
1234 current Job. This directive is not required, but if it is defined, and if the
1235 exit code of the program run is non-zero, the current Bacula job will be
1239 Run Before Job = "echo test"
1241 it's equivalent to :
1244 Command = "echo test"
1250 Lutz Kittler has pointed out that using the RunBeforeJob directive can be a
1251 simple way to modify your schedules during a holiday. For example, suppose
1252 that you normally do Full backups on Fridays, but Thursday and Friday are
1253 holidays. To avoid having to change tapes between Thursday and Friday when
1254 no one is in the office, you can create a RunBeforeJob that returns a
1255 non-zero status on Thursday and zero on all other days. That way, the
1256 Thursday job will not run, and on Friday the tape you inserted on Wednesday
1257 before leaving will be used.
1259 \item [Run After Job = \lt{}command\gt{}]
1260 \index[dir]{Run After Job}
1261 \index[dir]{Directive!Run After Job}
1262 The specified {\bf command} is run as an external program if the current
1263 job terminates normally (without error or without being canceled). This
1264 directive is not required. If the exit code of the program run is
1265 non-zero, Bacula will print a warning message. Before submitting the
1266 specified command to the operating system, Bacula performs character
1267 substitution as described above for the {\bf RunScript} directive.
1269 An example of the use of this directive is given in the
1270 \ilink{Tips Chapter}{JobNotification} of this manual.
1272 See the {\bf Run After Failed Job} if you
1273 want to run a script after the job has terminated with any
1276 \item [Run After Failed Job = \lt{}command\gt{}]
1277 \index[dir]{Run After Job}
1278 \index[dir]{Directive!Run After Job}
1279 The specified {\bf command} is run as an external program after the current
1280 job terminates with any error status. This directive is not required. The
1281 command string must be a valid program name or name of a shell script. If
1282 the exit code of the program run is non-zero, Bacula will print a
1283 warning message. Before submitting the specified command to the
1284 operating system, Bacula performs character substitution as described above
1285 for the {\bf RunScript} directive. Note, if you wish that your script
1286 will run regardless of the exit status of the Job, you can use this :
1289 Command = "echo test"
1293 RunsOnSuccess = yes # default, you can drop this line
1297 An example of the use of this directive is given in the
1298 \ilink{Tips Chapter}{JobNotification} of this manual.
1301 \item [Client Run Before Job = \lt{}command\gt{}]
1302 \index[dir]{Client Run Before Job}
1303 \index[dir]{Directive!Client Run Before Job}
1304 This directive is the same as {\bf Run Before Job} except that the
1305 program is run on the client machine. The same restrictions apply to
1306 Unix systems as noted above for the {\bf RunScript}.
1308 \item [Client Run After Job = \lt{}command\gt{}]
1309 \index[dir]{Client Run After Job}
1310 \index[dir]{Directive!Client Run After Job}
1311 The specified {\bf command} is run on the client machine as soon
1312 as data spooling is complete in order to allow restarting applications
1313 on the client as soon as possible. .
1315 Note, please see the notes above in {\bf RunScript}
1316 concerning Windows clients.
1318 \item [Rerun Failed Levels = \lt{}yes|no\gt{}]
1319 \index[dir]{Rerun Failed Levels}
1320 \index[dir]{Directive!Rerun Failed Levels}
1321 If this directive is set to {\bf yes} (default no), and Bacula detects that
1322 a previous job at a higher level (i.e. Full or Differential) has failed,
1323 the current job level will be upgraded to the higher level. This is
1324 particularly useful for Laptops where they may often be unreachable, and if
1325 a prior Full save has failed, you wish the very next backup to be a Full
1326 save rather than whatever level it is started as.
1328 There are several points that must be taken into account when using this
1329 directive: first, a failed job is defined as one that has not terminated
1330 normally, which includes any running job of the same name (you need to
1331 ensure that two jobs of the same name do not run simultaneously);
1332 secondly, the {\bf Ignore FileSet Changes} directive is not considered
1333 when checking for failed levels, which means that any FileSet change will
1336 \item [Spool Data = \lt{}yes|no\gt{}]
1337 \index[dir]{Spool Data}
1338 \index[dir]{Directive!Spool Data}
1340 If this directive is set to {\bf yes} (default no), the Storage daemon will
1341 be requested to spool the data for this Job to disk rather than write it
1342 directly to tape. Once all the data arrives or the spool files' maximum sizes
1343 are reached, the data will be despooled and written to tape. Spooling data
1344 prevents tape shoe-shine (start and stop) during
1345 Incremental saves. If you are writing to a disk file using this option
1346 will probably just slow down the backup jobs.
1348 NOTE: When this directive is set to yes, Spool Attributes is also
1349 automatically set to yes.
1351 \item [Spool Attributes = \lt{}yes|no\gt{}]
1352 \index[dir]{Spool Attributes}
1353 \index[dir]{Directive!Spool Attributes}
1355 \index[general]{slow}
1356 \index[dir]{Backups!slow}
1357 \index[general]{Backups!slow}
1358 The default is set to {\bf no}, which means that the File attributes are
1359 sent by the Storage daemon to the Director as they are stored on tape.
1360 However, if you want to avoid the possibility that database updates will
1361 slow down writing to the tape, you may want to set the value to {\bf
1362 yes}, in which case the Storage daemon will buffer the File attributes
1363 and Storage coordinates to a temporary file in the Working Directory,
1364 then when writing the Job data to the tape is completed, the attributes
1365 and storage coordinates will be sent to the Director.
1367 NOTE: When Spool Data is set to yes, Spool Attributes is also
1368 automatically set to yes.
1370 \item [Where = \lt{}directory\gt{}]
1372 \index[dir]{Directive!Where}
1373 This directive applies only to a Restore job and specifies a prefix to
1374 the directory name of all files being restored. This permits files to
1375 be restored in a different location from which they were saved. If {\bf
1376 Where} is not specified or is set to backslash ({\bf /}), the files will
1377 be restored to their original location. By default, we have set {\bf
1378 Where} in the example configuration files to be {\bf
1379 /tmp/bacula-restores}. This is to prevent accidental overwriting of
1382 \item [Add Prefix = \lt{}directory\gt{}]
1383 \label{confaddprefix}
1384 \index[dir]{AddPrefix}
1385 \index[dir]{Directive!AddPrefix}
1386 This directive applies only to a Restore job and specifies a prefix to the
1387 directory name of all files being restored. This will use \ilink{File
1388 Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later.
1390 \item [Add Suffix = \lt{}extention\gt{}]
1391 \index[dir]{AddSuffix}
1392 \index[dir]{Directive!AddSuffix}
1393 This directive applies only to a Restore job and specifies a suffix to all
1394 files being restored. This will use \ilink{File Relocation}{filerelocation}
1395 feature implemented in Bacula 2.1.8 or later.
1397 Using \texttt{Add Suffix=.old}, \texttt{/etc/passwd} will be restored to
1398 \texttt{/etc/passwsd.old}
1400 \item [Strip Prefix = \lt{}directory\gt{}]
1401 \index[dir]{StripPrefix}
1402 \index[dir]{Directive!StripPrefix}
1403 This directive applies only to a Restore job and specifies a prefix to remove
1404 from the directory name of all files being restored. This will use the
1405 \ilink{File Relocation}{filerelocation} feature implemented in Bacula 2.1.8
1408 Using \texttt{Strip Prefix=/etc}, \texttt{/etc/passwd} will be restored to
1411 Under Windows, if you want to restore \texttt{c:/files} to \texttt{d:/files},
1419 \item [RegexWhere = \lt{}expressions\gt{}]
1420 \index[dir]{RegexWhere}
1421 \index[dir]{Directive!RegexWhere}
1422 This directive applies only to a Restore job and specifies a regex filename
1423 manipulation of all files being restored. This will use \ilink{File
1424 Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later.
1426 For more informations about how use this option, see
1427 \ilink{this}{useregexwhere}.
1429 \item [Replace = \lt{}replace-option\gt{}]
1430 \index[dir]{Replace}
1431 \index[dir]{Directive!Replace}
1432 This directive applies only to a Restore job and specifies what happens
1433 when Bacula wants to restore a file or directory that already exists.
1434 You have the following options for {\bf replace-option}:
1440 when the file to be restored already exists, it is deleted and then
1441 replaced by the copy that was backed up.
1444 \index[dir]{ifnewer}
1445 if the backed up file (on tape) is newer than the existing file, the
1446 existing file is deleted and replaced by the back up.
1449 \index[dir]{ifolder}
1450 if the backed up file (on tape) is older than the existing file, the
1451 existing file is deleted and replaced by the back up.
1455 if the backed up file already exists, Bacula skips restoring this file.
1458 \item [Prefix Links=\lt{}yes|no\gt{}]
1459 \index[dir]{Prefix Links}
1460 \index[dir]{Directive!Prefix Links}
1461 If a {\bf Where} path prefix is specified for a recovery job, apply it
1462 to absolute links as well. The default is {\bf No}. When set to {\bf
1463 Yes} then while restoring files to an alternate directory, any absolute
1464 soft links will also be modified to point to the new alternate
1465 directory. Normally this is what is desired -- i.e. everything is self
1466 consistent. However, if you wish to later move the files to their
1467 original locations, all files linked with absolute names will be broken.
1469 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
1470 \index[dir]{Maximum Concurrent Jobs}
1471 \index[dir]{Directive!Maximum Concurrent Jobs}
1472 where \lt{}number\gt{} is the maximum number of Jobs from the current
1473 Job resource that can run concurrently. Note, this directive limits
1474 only Jobs with the same name as the resource in which it appears. Any
1475 other restrictions on the maximum concurrent jobs such as in the
1476 Director, Client, or Storage resources will also apply in addition to
1477 the limit specified here. The default is set to 1, but you may set it
1478 to a larger number. We strongly recommend that you read the WARNING
1479 documented under \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the
1480 Director's resource.
1482 \item [Reschedule On Error = \lt{}yes|no\gt{}]
1483 \index[dir]{Reschedule On Error}
1484 \index[dir]{Directive!Reschedule On Error}
1485 If this directive is enabled, and the job terminates in error, the job
1486 will be rescheduled as determined by the {\bf Reschedule Interval} and
1487 {\bf Reschedule Times} directives. If you cancel the job, it will not
1488 be rescheduled. The default is {\bf no} (i.e. the job will not be
1491 This specification can be useful for portables, laptops, or other
1492 machines that are not always connected to the network or switched on.
1494 \item [Reschedule Interval = \lt{}time-specification\gt{}]
1495 \index[dir]{Reschedule Interval}
1496 \index[dir]{Directive!Reschedule Interval}
1497 If you have specified {\bf Reschedule On Error = yes} and the job
1498 terminates in error, it will be rescheduled after the interval of time
1499 specified by {\bf time-specification}. See \ilink{the time
1500 specification formats}{Time} in the Configure chapter for details of
1501 time specifications. If no interval is specified, the job will not be
1502 rescheduled on error.
1504 \item [Reschedule Times = \lt{}count\gt{}]
1505 \index[dir]{Reschedule Times}
1506 \index[dir]{Directive!Reschedule Times}
1507 This directive specifies the maximum number of times to reschedule the
1508 job. If it is set to zero (the default) the job will be rescheduled an
1509 indefinite number of times.
1511 \item [Run = \lt{}job-name\gt{}]
1513 \index[dir]{Directive!Run}
1514 \index[dir]{Clone a Job}
1515 The Run directive (not to be confused with the Run option in a
1516 Schedule) allows you to start other jobs or to clone jobs. By using the
1517 cloning keywords (see below), you can backup
1518 the same data (or almost the same data) to two or more drives
1519 at the same time. The {\bf job-name} is normally the same name
1520 as the current Job resource (thus creating a clone). However, it
1521 may be any Job name, so one job may start other related jobs.
1523 The part after the equal sign must be enclosed in double quotes,
1524 and can contain any string or set of options (overrides) that you
1525 can specify when entering the Run command from the console. For
1526 example {\bf storage=DDS-4 ...}. In addition, there are two special
1527 keywords that permit you to clone the current job. They are {\bf level=\%l}
1528 and {\bf since=\%s}. The \%l in the level keyword permits
1529 entering the actual level of the current job and the \%s in the since
1530 keyword permits putting the same time for comparison as used on the
1531 current job. Note, in the case of the since keyword, the \%s must be
1532 enclosed in double quotes, and thus they must be preceded by a backslash
1533 since they are already inside quotes. For example:
1536 run = "Nightly-backup level=%l since=\"%s\" storage=DDS-4"
1539 A cloned job will not start additional clones, so it is not
1540 possible to recurse.
1542 Please note that all cloned jobs, as specified in the Run directives are
1543 submitted for running before the original job is run (while it is being
1544 initialized). This means that any clone job will actually start before
1545 the original job, and may even block the original job from starting
1546 until the original job finishes unless you allow multiple simultaneous
1547 jobs. Even if you set a lower priority on the clone job, if no other
1548 jobs are running, it will start before the original job.
1550 If you are trying to prioritize jobs by using the clone feature (Run
1551 directive), you will find it much easier to do using a RunScript
1552 resource, or a RunBeforeJob directive.
1555 \item [Priority = \lt{}number\gt{}]
1556 \index[dir]{Priority}
1557 \index[dir]{Directive!Priority}
1558 This directive permits you to control the order in which your jobs will
1559 be run by specifying a positive non-zero number. The higher the number,
1560 the lower the job priority. Assuming you are not running concurrent jobs,
1561 all queued jobs of priority 1 will run before queued jobs of priority 2
1562 and so on, regardless of the original scheduling order.
1564 The priority only affects waiting jobs that are queued to run, not jobs
1565 that are already running. If one or more jobs of priority 2 are already
1566 running, and a new job is scheduled with priority 1, the currently
1567 running priority 2 jobs must complete before the priority 1 job is run.
1569 The default priority is 10.
1571 If you want to run concurrent jobs you should
1572 keep these points in mind:
1575 \item See \ilink{Running Concurrent Jobs}{ConcurrentJobs} on how to setup
1578 \item Bacula concurrently runs jobs of only one priority at a time. It
1579 will not simultaneously run a priority 1 and a priority 2 job.
1581 \item If Bacula is running a priority 2 job and a new priority 1 job is
1582 scheduled, it will wait until the running priority 2 job terminates even
1583 if the Maximum Concurrent Jobs settings would otherwise allow two jobs
1584 to run simultaneously.
1586 \item Suppose that bacula is running a priority 2 job and a new priority 1
1587 job is scheduled and queued waiting for the running priority 2 job to
1588 terminate. If you then start a second priority 2 job, the waiting
1589 priority 1 job will prevent the new priority 2 job from running
1590 concurrently with the running priority 2 job. That is: as long as there
1591 is a higher priority job waiting to run, no new lower priority jobs will
1592 start even if the Maximum Concurrent Jobs settings would normally allow
1593 them to run. This ensures that higher priority jobs will be run as soon
1597 If you have several jobs of different priority, it may not best to start
1598 them at exactly the same time, because Bacula must examine them one at a
1599 time. If by Bacula starts a lower priority job first, then it will run
1600 before your high priority jobs. If you experience this problem, you may
1601 avoid it by starting any higher priority jobs a few seconds before lower
1602 priority ones. This insures that Bacula will examine the jobs in the
1603 correct order, and that your priority scheme will be respected.
1605 \label{WritePartAfterJob}
1606 \item [Write Part After Job = \lt{}yes|no\gt{}]
1607 \index[dir]{Write Part After Job}
1608 \index[dir]{Directive!Write Part After Job}
1609 This directive is only implemented in version 1.37 and later.
1610 If this directive is set to {\bf yes} (default {\bf no}), a new part file
1611 will be created after the job is finished.
1613 It should be set to {\bf yes} when writing to devices that require mount
1614 (for example DVD), so you are sure that the current part, containing
1615 this job's data, is written to the device, and that no data is left in
1616 the temporary file on the hard disk. However, on some media, like DVD+R
1617 and DVD-R, a lot of space (about 10Mb) is lost every time a part is
1618 written. So, if you run several jobs each after another, you could set
1619 this directive to {\bf no} for all jobs, except the last one, to avoid
1620 wasting too much space, but to ensure that the data is written to the
1621 medium when all jobs are finished.
1623 This directive is ignored with tape and FIFO devices.
1627 The following is an example of a valid Job resource definition:
1634 Level = Incremental # default
1636 FileSet="Minou Full Set"
1639 Schedule = "MinouWeeklyCycle"
1645 \section{The JobDefs Resource}
1646 \label{JobDefsResource}
1647 \index[general]{JobDefs Resource}
1648 \index[general]{Resource!JobDefs}
1650 The JobDefs resource permits all the same directives that can appear in a Job
1651 resource. However, a JobDefs resource does not create a Job, rather it can be
1652 referenced within a Job to provide defaults for that Job. This permits you to
1653 concisely define several nearly identical Jobs, each one referencing a JobDefs
1654 resource which contains the defaults. Only the changes from the defaults need to
1655 be mentioned in each Job.
1657 \section{The Schedule Resource}
1658 \label{ScheduleResource}
1659 \index[general]{Resource!Schedule}
1660 \index[general]{Schedule Resource}
1662 The Schedule resource provides a means of automatically scheduling a Job as
1663 well as the ability to override the default Level, Pool, Storage and Messages
1664 resources. If a Schedule resource is not referenced in a Job, the Job can only
1665 be run manually. In general, you specify an action to be taken and when.
1670 \index[dir]{Schedule}
1671 \index[dir]{Directive!Schedule}
1672 Start of the Schedule directives. No {\bf Schedule} resource is
1673 required, but you will need at least one if you want Jobs to be
1674 automatically started.
1676 \item [Name = \lt{}name\gt{}]
1678 \index[dir]{Directive!Name}
1679 The name of the schedule being defined. The Name directive is required.
1681 \item [Run = \lt{}Job-overrides\gt{} \lt{}Date-time-specification\gt{}]
1683 \index[dir]{Directive!Run}
1684 The Run directive defines when a Job is to be run, and what overrides if
1685 any to apply. You may specify multiple {\bf run} directives within a
1686 {\bf Schedule} resource. If you do, they will all be applied (i.e.
1687 multiple schedules). If you have two {\bf Run} directives that start at
1688 the same time, two Jobs will start at the same time (well, within one
1689 second of each other).
1691 The {\bf Job-overrides} permit overriding the Level, the Storage, the
1692 Messages, and the Pool specifications provided in the Job resource. In
1693 addition, the FullPool, the IncrementalPool, and the DifferentialPool
1694 specifications permit overriding the Pool specification according to
1695 what backup Job Level is in effect.
1697 By the use of overrides, you may customize a particular Job. For
1698 example, you may specify a Messages override for your Incremental
1699 backups that outputs messages to a log file, but for your weekly or
1700 monthly Full backups, you may send the output by email by using a
1701 different Messages override.
1703 {\bf Job-overrides} are specified as: {\bf keyword=value} where the
1704 keyword is Level, Storage, Messages, Pool, FullPool, DifferentialPool,
1705 or IncrementalPool, and the {\bf value} is as defined on the respective
1706 directive formats for the Job resource. You may specify multiple {\bf
1707 Job-overrides} on one {\bf Run} directive by separating them with one or
1708 more spaces or by separating them with a trailing comma. For example:
1714 \index[dir]{Directive!Level}
1715 is all files in the FileSet whether or not they have changed.
1717 \item [Level=Incremental]
1719 \index[dir]{Directive!Level}
1720 is all files that have changed since the last backup.
1724 \index[dir]{Directive!Pool}
1725 specifies to use the Pool named {\bf Weekly}.
1727 \item [Storage=DLT\_Drive]
1728 \index[dir]{Storage}
1729 \index[dir]{Directive!Storage}
1730 specifies to use {\bf DLT\_Drive} for the storage device.
1732 \item [Messages=Verbose]
1733 \index[dir]{Messages}
1734 \index[dir]{Directive!Messages}
1735 specifies to use the {\bf Verbose} message resource for the Job.
1737 \item [FullPool=Full]
1738 \index[dir]{FullPool}
1739 \index[dir]{Directive!FullPool}
1740 specifies to use the Pool named {\bf Full} if the job is a full backup, or
1742 upgraded from another type to a full backup.
1744 \item [DifferentialPool=Differential]
1745 \index[dir]{DifferentialPool}
1746 \index[dir]{Directive!DifferentialPool}
1747 specifies to use the Pool named {\bf Differential} if the job is a
1748 differential backup.
1750 \item [IncrementalPool=Incremental]
1751 \index[dir]{IncrementalPool}
1752 \index[dir]{Directive!IncrementalPool}
1753 specifies to use the Pool named {\bf Incremental} if the job is an
1756 \item [SpoolData=yes|no]
1757 \index[dir]{SpoolData}
1758 \index[dir]{Directive!SpoolData}
1759 tells Bacula to request the Storage daemon to spool data to a disk file
1760 before writing it to the Volume (normally a tape). Thus the data is
1761 written in large blocks to the Volume rather than small blocks. This
1762 directive is particularly useful when running multiple simultaneous
1763 backups to tape. It prevents interleaving of the job data and reduces
1764 or eliminates tape drive stop and start commonly known as "shoe-shine".
1766 \item [SpoolSize={\it bytes}]
1767 \index[dir]{SpoolSize}
1768 \index[dir]{Directive!SpoolSize}
1769 where the bytes specify the maximum spool size for this job.
1770 The default is take from Device Maximum Spool Size limit.
1771 This directive is available only in Bacula version 2.3.5 or
1774 \item [WritePartAfterJob=yes|no]
1775 \index[dir]{WritePartAfterJob}
1776 \index[dir]{Directive!WritePartAfterJob}
1777 tells Bacula to request the Storage daemon to write the current part
1778 file to the device when the job is finished (see \ilink{Write Part After
1779 Job directive in the Job resource}{WritePartAfterJob}). Please note,
1780 this directive is implemented only in version 1.37 and later. The
1781 default is yes. We strongly recommend that you keep this set to yes
1782 otherwise, when the last job has finished one part will remain in the
1783 spool file and restore may or may not work.
1787 {\bf Date-time-specification} determines when the Job is to be run. The
1788 specification is a repetition, and as a default Bacula is set to run a job at
1789 the beginning of the hour of every hour of every day of every week of every
1790 month of every year. This is not normally what you want, so you must specify
1791 or limit when you want the job to run. Any specification given is assumed to
1792 be repetitive in nature and will serve to override or limit the default
1793 repetition. This is done by specifying masks or times for the hour, day of the
1794 month, day of the week, week of the month, week of the year, and month when
1795 you want the job to run. By specifying one or more of the above, you can
1796 define a schedule to repeat at almost any frequency you want.
1798 Basically, you must supply a {\bf month}, {\bf day}, {\bf hour}, and {\bf
1799 minute} the Job is to be run. Of these four items to be specified, {\bf day}
1800 is special in that you may either specify a day of the month such as 1, 2,
1801 ... 31, or you may specify a day of the week such as Monday, Tuesday, ...
1802 Sunday. Finally, you may also specify a week qualifier to restrict the
1803 schedule to the first, second, third, fourth, or fifth week of the month.
1805 For example, if you specify only a day of the week, such as {\bf Tuesday} the
1806 Job will be run every hour of every Tuesday of every Month. That is the {\bf
1807 month} and {\bf hour} remain set to the defaults of every month and all
1810 Note, by default with no other specification, your job will run at the
1811 beginning of every hour. If you wish your job to run more than once in any
1812 given hour, you will need to specify multiple {\bf run} specifications each
1813 with a different minute.
1815 The date/time to run the Job can be specified in the following way in
1822 <week-keyword> = 1st | 2nd | 3rd | 4th | 5th | first |
1823 second | third | fourth | fifth
1824 <wday-keyword> = sun | mon | tue | wed | thu | fri | sat |
1825 sunday | monday | tuesday | wednesday |
1826 thursday | friday | saturday
1827 <week-of-year-keyword> = w00 | w01 | ... w52 | w53
1828 <month-keyword> = jan | feb | mar | apr | may | jun | jul |
1829 aug | sep | oct | nov | dec | january |
1830 february | ... | december
1831 <daily-keyword> = daily
1832 <weekly-keyword> = weekly
1833 <monthly-keyword> = monthly
1834 <hourly-keyword> = hourly
1835 <digit> = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
1836 <number> = <digit> | <digit><number>
1837 <12hour> = 0 | 1 | 2 | ... 12
1838 <hour> = 0 | 1 | 2 | ... 23
1839 <minute> = 0 | 1 | 2 | ... 59
1840 <day> = 1 | 2 | ... 31
1841 <time> = <hour>:<minute> |
1842 <12hour>:<minute>am |
1844 <time-spec> = <at-keyword> <time> |
1846 <date-keyword> = <void-keyword> <weekly-keyword>
1847 <day-range> = <day>-<day>
1848 <month-range> = <month-keyword>-<month-keyword>
1849 <wday-range> = <wday-keyword>-<wday-keyword>
1850 <range> = <day-range> | <month-range> |
1852 <date> = <date-keyword> | <day> | <range>
1853 <date-spec> = <date> | <date-spec>
1854 <day-spec> = <day> | <wday-keyword> |
1855 <day-range> | <wday-range> |
1857 <day-spec> = <day> | <wday-keyword> |
1858 <day> | <wday-range> |
1859 <week-keyword> <wday-keyword> |
1860 <week-keyword> <wday-range>
1861 <month-spec> = <month-keyword> | <month-range> |
1863 <date-time-spec> = <month-spec> <day-spec> <time-spec>
1869 Note, the Week of Year specification wnn follows the ISO standard definition
1870 of the week of the year, where Week 1 is the week in which the first Thursday
1871 of the year occurs, or alternatively, the week which contains the 4th of
1872 January. Weeks are numbered w01 to w53. w00 for Bacula is the week that
1873 precedes the first ISO week (i.e. has the first few days of the year if any
1874 occur before Thursday). w00 is not defined by the ISO specification. A week
1875 starts with Monday and ends with Sunday.
1877 According to the NIST (US National Institute of Standards and Technology),
1878 12am and 12pm are ambiguous and can be defined to anything. However,
1879 12:01am is the same as 00:01 and 12:01pm is the same as 12:01, so Bacula
1880 defines 12am as 00:00 (midnight) and 12pm as 12:00 (noon). You can avoid
1881 this abiguity (confusion) by using 24 hour time specifications (i.e. no
1882 am/pm). This is the definition in Bacula version 2.0.3 and later.
1884 An example schedule resource that is named {\bf WeeklyCycle} and runs a job
1885 with level full each Sunday at 2:05am and an incremental job Monday through
1886 Saturday at 2:05am is:
1891 Name = "WeeklyCycle"
1892 Run = Level=Full sun at 2:05
1893 Run = Level=Incremental mon-sat at 2:05
1898 An example of a possible monthly cycle is as follows:
1903 Name = "MonthlyCycle"
1904 Run = Level=Full Pool=Monthly 1st sun at 2:05
1905 Run = Level=Differential 2nd-5th sun at 2:05
1906 Run = Level=Incremental Pool=Daily mon-sat at 2:05
1911 The first of every month:
1917 Run = Level=Full on 1 at 2:05
1918 Run = Level=Incremental on 2-31 at 2:05
1929 Run = Level=Full hourly at 0:05
1930 Run = Level=Full hourly at 0:15
1931 Run = Level=Full hourly at 0:25
1932 Run = Level=Full hourly at 0:35
1933 Run = Level=Full hourly at 0:45
1934 Run = Level=Full hourly at 0:55
1939 \section{Technical Notes on Schedules}
1940 \index[general]{Schedules!Technical Notes on}
1941 \index[general]{Technical Notes on Schedules}
1943 Internally Bacula keeps a schedule as a bit mask. There are six masks and a
1944 minute field to each schedule. The masks are hour, day of the month (mday),
1945 month, day of the week (wday), week of the month (wom), and week of the year
1946 (woy). The schedule is initialized to have the bits of each of these masks
1947 set, which means that at the beginning of every hour, the job will run. When
1948 you specify a month for the first time, the mask will be cleared and the bit
1949 corresponding to your selected month will be selected. If you specify a second
1950 month, the bit corresponding to it will also be added to the mask. Thus when
1951 Bacula checks the masks to see if the bits are set corresponding to the
1952 current time, your job will run only in the two months you have set. Likewise,
1953 if you set a time (hour), the hour mask will be cleared, and the hour you
1954 specify will be set in the bit mask and the minutes will be stored in the
1957 For any schedule you have defined, you can see how these bits are set by doing
1958 a {\bf show schedules} command in the Console program. Please note that the
1959 bit mask is zero based, and Sunday is the first day of the week (bit zero).
1963 \section{The Client Resource}
1964 \label{ClientResource2}
1965 \index[general]{Resource!Client}
1966 \index[general]{Client Resource}
1968 The Client resource defines the attributes of the Clients that are served by
1969 this Director; that is the machines that are to be backed up. You will need
1970 one Client resource definition for each machine to be backed up.
1974 \item [Client (or FileDaemon)]
1975 \index[dir]{Client (or FileDaemon)}
1976 \index[dir]{Directive!Client (or FileDaemon)}
1977 Start of the Client directives.
1979 \item [Name = \lt{}name\gt{}]
1981 \index[dir]{Directive!Name}
1982 The client name which will be used in the Job resource directive or in the
1983 console run command. This directive is required.
1985 \item [Address = \lt{}address\gt{}]
1986 \index[dir]{Address}
1987 \index[dir]{Directive!FD Address}
1988 \index[dir]{File Daemon Address}
1989 \index[dir]{Client Address}
1990 Where the address is a host name, a fully qualified domain name, or a
1991 network address in dotted quad notation for a Bacula File server daemon.
1992 This directive is required.
1994 \item [FD Port = \lt{}port-number\gt{}]
1995 \index[dir]{FD Port}
1996 \index[dir]{Directive!FD Port}
1997 Where the port is a port number at which the Bacula File server daemon can
1998 be contacted. The default is 9102.
2000 \item [Catalog = \lt{}Catalog-resource-name\gt{}]
2001 \index[dir]{Catalog}
2002 \index[dir]{Directive!Catalog}
2003 This specifies the name of the catalog resource to be used for this Client.
2004 This directive is required.
2006 \item [Password = \lt{}password\gt{}]
2007 \index[dir]{Password}
2008 \index[dir]{Directive!Password}
2009 This is the password to be used when establishing a connection with the File
2010 services, so the Client configuration file on the machine to be backed up
2011 must have the same password defined for this Director. This directive is
2012 required. If you have either {\bf /dev/random} {\bf bc} on your machine,
2013 Bacula will generate a random password during the configuration process,
2014 otherwise it will be left blank.
2016 The password is plain text. It is not generated through any special
2017 process, but it is preferable for security reasons to make the text
2020 \label{FileRetention}
2021 \item [File Retention = \lt{}time-period-specification\gt{}]
2022 \index[dir]{File Retention}
2023 \index[dir]{Directive!File Retention}
2024 The File Retention directive defines the length of time that Bacula will
2025 keep File records in the Catalog database after the End time of the
2026 Job corresponding to the File records.
2027 When this time period expires, and if
2028 {\bf AutoPrune} is set to {\bf yes} Bacula will prune (remove) File records
2029 that are older than the specified File Retention period. Note, this affects
2030 only records in the catalog database. It does not affect your archive
2033 File records may actually be retained for a shorter period than you specify
2034 on this directive if you specify either a shorter {\bf Job Retention} or a
2035 shorter {\bf Volume Retention} period. The shortest retention period of the
2036 three takes precedence. The time may be expressed in seconds, minutes,
2037 hours, days, weeks, months, quarters, or years. See the
2038 \ilink{ Configuration chapter}{Time} of this manual for
2039 additional details of time specification.
2041 The default is 60 days.
2043 \label{JobRetention}
2044 \item [Job Retention = \lt{}time-period-specification\gt{}]
2045 \index[dir]{Job Retention}
2046 \index[dir]{Directive!Job Retention}
2047 The Job Retention directive defines the length of time that Bacula will keep
2048 Job records in the Catalog database after the Job End time. When
2049 this time period expires, and if {\bf AutoPrune} is set to {\bf yes}
2050 Bacula will prune (remove) Job records that are older than the specified
2051 File Retention period. As with the other retention periods, this
2052 affects only records in the catalog and not data in your archive backup.
2054 If a Job record is selected for pruning, all associated File and JobMedia
2055 records will also be pruned regardless of the File Retention period set.
2056 As a consequence, you normally will set the File retention period to be
2057 less than the Job retention period. The Job retention period can actually
2058 be less than the value you specify here if you set the {\bf Volume
2059 Retention} directive in the Pool resource to a smaller duration. This is
2060 because the Job retention period and the Volume retention period are
2061 independently applied, so the smaller of the two takes precedence.
2063 The Job retention period is specified as seconds, minutes, hours, days,
2064 weeks, months, quarters, or years. See the
2065 \ilink{ Configuration chapter}{Time} of this manual for
2066 additional details of time specification.
2068 The default is 180 days.
2071 \item [AutoPrune = \lt{}yes|no\gt{}]
2072 \index[dir]{AutoPrune}
2073 \index[dir]{Directive!AutoPrune}
2074 If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater)
2075 will automatically apply the File retention period and the Job retention
2076 period for the Client at the end of the Job. If you set {\bf AutoPrune = no},
2077 pruning will not be done, and your Catalog will grow in size each time you
2078 run a Job. Pruning affects only information in the catalog and not data
2079 stored in the backup archives (on Volumes).
2081 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
2082 \index[dir]{Maximum Concurrent Jobs}
2083 \index[dir]{Directive!Maximum Concurrent Jobs}
2084 where \lt{}number\gt{} is the maximum number of Jobs with the current Client
2085 that can run concurrently. Note, this directive limits only Jobs for Clients
2086 with the same name as the resource in which it appears. Any other
2087 restrictions on the maximum concurrent jobs such as in the Director, Job, or
2088 Storage resources will also apply in addition to any limit specified here.
2089 The default is set to 1, but you may set it to a larger number. We strongly
2090 recommend that you read the WARNING documented under
2091 \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's
2094 \item [Priority = \lt{}number\gt{}]
2095 \index[dir]{Priority}
2096 \index[dir]{Directive!Priority}
2097 The number specifies the priority of this client relative to other clients
2098 that the Director is processing simultaneously. The priority can range from
2099 1 to 1000. The clients are ordered such that the smaller number priorities
2100 are performed first (not currently implemented).
2103 The following is an example of a valid Client resource definition:
2109 FDAddress = minimatou
2111 Password = very_good
2116 \section{The Storage Resource}
2117 \label{StorageResource2}
2118 \index[general]{Resource!Storage}
2119 \index[general]{Storage Resource}
2121 The Storage resource defines which Storage daemons are available for use by
2127 \index[dir]{Storage}
2128 \index[dir]{Directive!Storage}
2129 Start of the Storage resources. At least one storage resource must be
2132 \item [Name = \lt{}name\gt{}]
2134 \index[dir]{Directive!Name}
2135 The name of the storage resource. This name appears on the Storage directive
2136 specified in the Job resource and is required.
2138 \item [Address = \lt{}address\gt{}]
2139 \index[dir]{Address}
2140 \index[dir]{Directive!SD Address}
2141 \index[dir]{Storage daemon Address}
2142 Where the address is a host name, a {\bf fully qualified domain name}, or an
2143 {\bf IP address}. Please note that the \lt{}address\gt{} as specified here
2144 will be transmitted to the File daemon who will then use it to contact the
2145 Storage daemon. Hence, it is {\bf not}, a good idea to use {\bf localhost} as
2146 the name but rather a fully qualified machine name or an IP address. This
2147 directive is required.
2149 \item [SD Port = \lt{}port\gt{}]
2150 \index[dir]{SD Port}
2151 \index[dir]{Directive!SD Port}
2152 Where port is the port to use to contact the storage daemon for information
2153 and to start jobs. This same port number must appear in the Storage resource
2154 of the Storage daemon's configuration file. The default is 9103.
2156 \item [Password = \lt{}password\gt{}]
2157 \index[dir]{Password}
2158 \index[dir]{Directive!Password}
2159 This is the password to be used when establishing a connection with the
2160 Storage services. This same password also must appear in the Director
2161 resource of the Storage daemon's configuration file. This directive is
2162 required. If you have either {\bf /dev/random} {\bf bc} on your machine,
2163 Bacula will generate a random password during the configuration process,
2164 otherwise it will be left blank.
2166 The password is plain text. It is not generated through any special
2167 process, but it is preferable for security reasons to use random text.
2169 \item [Device = \lt{}device-name\gt{}]
2171 \index[dir]{Directive!Device}
2172 This directive specifies the Storage daemon's name of the device
2173 resource to be used for the storage. If you are using an Autochanger,
2174 the name specified here should be the name of the Storage daemon's
2175 Autochanger resource rather than the name of an individual device. This
2176 name is not the physical device name, but the logical device name as
2177 defined on the {\bf Name} directive contained in the {\bf Device} or the
2178 {\bf Autochanger} resource definition of the {\bf Storage daemon}
2179 configuration file. You can specify any name you would like (even the
2180 device name if you prefer) up to a maximum of 127 characters in length.
2181 The physical device name associated with this device is specified in the
2182 {\bf Storage daemon} configuration file (as {\bf Archive Device}).
2183 Please take care not to define two different Storage resource directives
2184 in the Director that point to the same Device in the Storage daemon.
2185 Doing so may cause the Storage daemon to block (or hang) attempting to
2186 open the same device that is already open. This directive is required.
2189 \item [Media Type = \lt{}MediaType\gt{}]
2190 \index[dir]{Media Type}
2191 \index[dir]{Directive!Media Type}
2192 This directive specifies the Media Type to be used to store the data.
2193 This is an arbitrary string of characters up to 127 maximum that you
2194 define. It can be anything you want. However, it is best to make it
2195 descriptive of the storage media (e.g. File, DAT, "HP DLT8000", 8mm,
2196 ...). In addition, it is essential that you make the {\bf Media Type}
2197 specification unique for each storage media type. If you have two DDS-4
2198 drives that have incompatible formats, or if you have a DDS-4 drive and
2199 a DDS-4 autochanger, you almost certainly should specify different {\bf
2200 Media Types}. During a restore, assuming a {\bf DDS-4} Media Type is
2201 associated with the Job, Bacula can decide to use any Storage daemon
2202 that supports Media Type {\bf DDS-4} and on any drive that supports it.
2204 If you are writing to disk Volumes, you must make doubly sure that each
2205 Device resource defined in the Storage daemon (and hence in the
2206 Director's conf file) has a unique media type. Otherwise for Bacula
2207 versions 1.38 and older, your restores may not work because Bacula
2208 will assume that you can mount any Media Type with the same name on
2209 any Device associated with that Media Type. This is possible with
2210 tape drives, but with disk drives, unless you are very clever you
2211 cannot mount a Volume in any directory -- this can be done by creating
2212 an appropriate soft link.
2214 Currently Bacula permits only a single Media Type per Storage
2215 and Device definition. Consequently, if
2216 you have a drive that supports more than one Media Type, you can
2217 give a unique string to Volumes with different intrinsic Media
2218 Type (Media Type = DDS-3-4 for DDS-3 and DDS-4 types), but then
2219 those volumes will only be mounted on drives indicated with the
2220 dual type (DDS-3-4).
2222 If you want to tie Bacula to using a single Storage daemon or drive, you
2223 must specify a unique Media Type for that drive. This is an important
2224 point that should be carefully understood. Note, this applies equally
2225 to Disk Volumes. If you define more than one disk Device resource in
2226 your Storage daemon's conf file, the Volumes on those two devices are in
2227 fact incompatible because one can not be mounted on the other device
2228 since they are found in different directories. For this reason, you
2229 probably should use two different Media Types for your two disk Devices
2230 (even though you might think of them as both being File types). You can
2231 find more on this subject in the \ilink{Basic Volume
2232 Management}{DiskChapter} chapter of this manual.
2234 The {\bf MediaType} specified in the Director's Storage resource, {\bf
2235 must} correspond to the {\bf Media Type} specified in the {\bf Device}
2236 resource of the {\bf Storage daemon} configuration file. This directive
2237 is required, and it is used by the Director and the Storage daemon to
2238 ensure that a Volume automatically selected from the Pool corresponds to
2239 the physical device. If a Storage daemon handles multiple devices (e.g.
2240 will write to various file Volumes on different partitions), this
2241 directive allows you to specify exactly which device.
2243 As mentioned above, the value specified in the Director's Storage
2244 resource must agree with the value specified in the Device resource in
2245 the {\bf Storage daemon's} configuration file. It is also an additional
2246 check so that you don't try to write data for a DLT onto an 8mm device.
2248 \label{Autochanger1}
2249 \item [Autochanger = \lt{}yes|no\gt{}]
2250 \index[dir]{Autochanger}
2251 \index[dir]{Directive!Autochanger}
2252 If you specify {\bf yes} for this command (the default is {\bf no}),
2253 when you use the {\bf label} command or the {\bf add} command to create
2254 a new Volume, {\bf Bacula} will also request the Autochanger Slot
2255 number. This simplifies creating database entries for Volumes in an
2256 autochanger. If you forget to specify the Slot, the autochanger will
2257 not be used. However, you may modify the Slot associated with a Volume
2258 at any time by using the {\bf update volume} or {\bf update slots}
2259 command in the console program. When {\bf autochanger} is enabled, the
2260 algorithm used by Bacula to search for available volumes will be
2261 modified to consider only Volumes that are known to be in the
2262 autochanger's magazine. If no {\bf in changer} volume is found, Bacula
2263 will attempt recycling, pruning, ..., and if still no volume is found,
2264 Bacula will search for any volume whether or not in the magazine. By
2265 privileging in changer volumes, this procedure minimizes operator
2266 intervention. The default is {\bf no}.
2268 For the autochanger to be used, you must also specify {\bf Autochanger =
2269 yes} in the \ilink{Device Resource}{Autochanger} in the Storage daemon's
2270 configuration file as well as other important Storage daemon
2271 configuration information. Please consult the \ilink{Using
2272 Autochangers}{AutochangersChapter} manual of this chapter for the
2273 details of using autochangers.
2275 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
2276 \index[dir]{Maximum Concurrent Jobs}
2277 \index[dir]{Directive!Maximum Concurrent Jobs}
2278 where \lt{}number\gt{} is the maximum number of Jobs with the current
2279 Storage resource that can run concurrently. Note, this directive limits
2280 only Jobs for Jobs using this Storage daemon. Any other restrictions on
2281 the maximum concurrent jobs such as in the Director, Job, or Client
2282 resources will also apply in addition to any limit specified here. The
2283 default is set to 1, but you may set it to a larger number. However, if
2284 you set the Storage daemon's number of concurrent jobs greater than one,
2285 we recommend that you read the waring documented under \ilink{Maximum
2286 Concurrent Jobs}{DirMaxConJobs} in the Director's resource or simply
2287 turn data spooling on as documented in the \ilink{Data
2288 Spooling}{SpoolingChapter} chapter of this manual.
2290 \item [Heartbeat Interval = \lt{}time-interval\gt{}]
2291 \index[dir]{Heartbeat Interval}
2292 \index[dir]{Directive!Heartbeat}
2293 This directive is optional and if specified will cause the Director to
2294 set a keepalive interval (heartbeat) in seconds on each of the sockets
2295 it opens for the Storage resource. This value will override any
2296 specified at the Director level. It is implemented only on systems
2297 (Linux, ...) that provide the {\bf setsockopt} TCP\_KEEPIDLE function.
2298 The default value is zero, which means no change is made to the socket.
2302 The following is an example of a valid Storage resource definition:
2306 # Definition of tape storage device
2310 Password = storage_password # password for Storage daemon
2311 Device = "HP DLT 80" # same as Device in Storage daemon
2312 Media Type = DLT8000 # same as MediaType in Storage daemon
2317 \section{The Pool Resource}
2318 \label{PoolResource}
2319 \index[general]{Resource!Pool}
2320 \index[general]{Pool Resource}
2322 The Pool resource defines the set of storage Volumes (tapes or files) to be
2323 used by Bacula to write the data. By configuring different Pools, you can
2324 determine which set of Volumes (media) receives the backup data. This permits,
2325 for example, to store all full backup data on one set of Volumes and all
2326 incremental backups on another set of Volumes. Alternatively, you could assign
2327 a different set of Volumes to each machine that you backup. This is most
2328 easily done by defining multiple Pools.
2330 Another important aspect of a Pool is that it contains the default attributes
2331 (Maximum Jobs, Retention Period, Recycle flag, ...) that will be given to a
2332 Volume when it is created. This avoids the need for you to answer a large
2333 number of questions when labeling a new Volume. Each of these attributes can
2334 later be changed on a Volume by Volume basis using the {\bf update} command in
2335 the console program. Note that you must explicitly specify which Pool Bacula
2336 is to use with each Job. Bacula will not automatically search for the correct
2339 Most often in Bacula installations all backups for all machines (Clients) go
2340 to a single set of Volumes. In this case, you will probably only use the {\bf
2341 Default} Pool. If your backup strategy calls for you to mount a different tape
2342 each day, you will probably want to define a separate Pool for each day. For
2343 more information on this subject, please see the
2344 \ilink{Backup Strategies}{StrategiesChapter} chapter of this
2348 To use a Pool, there are three distinct steps. First the Pool must be defined
2349 in the Director's configuration file. Then the Pool must be written to the
2350 Catalog database. This is done automatically by the Director each time that it
2351 starts, or alternatively can be done using the {\bf create} command in the
2352 console program. Finally, if you change the Pool definition in the Director's
2353 configuration file and restart Bacula, the pool will be updated alternatively
2354 you can use the {\bf update pool} console command to refresh the database
2355 image. It is this database image rather than the Director's resource image
2356 that is used for the default Volume attributes. Note, for the pool to be
2357 automatically created or updated, it must be explicitly referenced by a Job
2360 Next the physical media must be labeled. The labeling can either be done with
2361 the {\bf label} command in the {\bf console} program or using the {\bf btape}
2362 program. The preferred method is to use the {\bf label} command in the {\bf
2365 Finally, you must add Volume names (and their attributes) to the Pool. For
2366 Volumes to be used by Bacula they must be of the same {\bf Media Type} as the
2367 archive device specified for the job (i.e. if you are going to back up to a
2368 DLT device, the Pool must have DLT volumes defined since 8mm volumes cannot be
2369 mounted on a DLT drive). The {\bf Media Type} has particular importance if you
2370 are backing up to files. When running a Job, you must explicitly specify which
2371 Pool to use. Bacula will then automatically select the next Volume to use from
2372 the Pool, but it will ensure that the {\bf Media Type} of any Volume selected
2373 from the Pool is identical to that required by the Storage resource you have
2374 specified for the Job.
2376 If you use the {\bf label} command in the console program to label the
2377 Volumes, they will automatically be added to the Pool, so this last step is
2378 not normally required.
2380 It is also possible to add Volumes to the database without explicitly labeling
2381 the physical volume. This is done with the {\bf add} console command.
2383 As previously mentioned, each time Bacula starts, it scans all the Pools
2384 associated with each Catalog, and if the database record does not already
2385 exist, it will be created from the Pool Resource definition. {\bf Bacula}
2386 probably should do an {\bf update pool} if you change the Pool definition, but
2387 currently, you must do this manually using the {\bf update pool} command in
2388 the Console program.
2390 The Pool Resource defined in the Director's configuration file
2391 (bacula-dir.conf) may contain the following directives:
2397 \index[dir]{Directive!Pool}
2398 Start of the Pool resource. There must be at least one Pool resource
2402 \item [Name = \lt{}name\gt{}]
2404 \index[dir]{Directive!Name}
2405 The name of the pool. For most applications, you will use the default
2406 pool name {\bf Default}. This directive is required.
2409 \item [Maximum Volumes = \lt{}number\gt{}]
2410 \index[dir]{Maximum Volumes}
2411 \index[dir]{Directive!Maximum Volumes}
2412 This directive specifies the maximum number of volumes (tapes or files)
2413 contained in the pool. This directive is optional, if omitted or set to
2414 zero, any number of volumes will be permitted. In general, this
2415 directive is useful for Autochangers where there is a fixed number of
2416 Volumes, or for File storage where you wish to ensure that the backups
2417 made to disk files do not become too numerous or consume too much space.
2419 \item [Pool Type = \lt{}type\gt{}]
2420 \index[dir]{Pool Type}
2421 \index[dir]{Directive!Pool Type}
2422 This directive defines the pool type, which corresponds to the type of
2423 Job being run. It is required and may be one of the following:
2433 Note, only Backup is current implemented.
2435 \item [Storage = \lt{}storage-resource-name\gt{}]
2436 \index[dir]{Storage}
2437 \index[dir]{Directive!Storage}
2438 The Storage directive defines the name of the storage services where you
2439 want to backup the FileSet data. For additional details, see the
2440 \ilink{Storage Resource Chapter}{StorageResource2} of this manual.
2441 The Storage resource may also be specified in the Job resource,
2442 but the value, if any, in the Pool resource overrides any value
2443 in the Job. This Storage resource definition is not required by either
2444 the Job resource or in the Pool, but it must be specified in
2445 one or the other. If not configuration error will result.
2447 \item [Use Volume Once = \lt{}yes|no\gt{}]
2448 \index[dir]{Use Volume Once}
2449 \index[dir]{Directive!Use Volume Once}
2450 This directive if set to {\bf yes} specifies that each volume is to be
2451 used only once. This is most useful when the Media is a file and you
2452 want a new file for each backup that is done. The default is {\bf no}
2453 (i.e. use volume any number of times). This directive will most likely
2454 be phased out (deprecated), so you are recommended to use {\bf Maximum
2455 Volume Jobs = 1} instead.
2457 The value defined by this directive in the bacula-dir.conf file is the
2458 default value used when a Volume is created. Once the volume is
2459 created, changing the value in the bacula-dir.conf file will not change
2460 what is stored for the Volume. To change the value for an existing
2461 Volume you must use the {\bf update} command in the Console.
2463 Please see the notes below under {\bf Maximum Volume Jobs} concerning
2464 using this directive with multiple simultaneous jobs.
2466 \item [Maximum Volume Jobs = \lt{}positive-integer\gt{}]
2467 \index[dir]{Maximum Volume Jobs}
2468 \index[dir]{Directive!Maximum Volume Jobs}
2469 This directive specifies the maximum number of Jobs that can be written
2470 to the Volume. If you specify zero (the default), there is no limit.
2471 Otherwise, when the number of Jobs backed up to the Volume equals {\bf
2472 positive-integer} the Volume will be marked {\bf Used}. When the Volume
2473 is marked {\bf Used} it can no longer be used for appending Jobs, much
2474 like the {\bf Full} status but it can be recycled if recycling is
2475 enabled, and thus used again. By setting {\bf MaximumVolumeJobs} to
2476 one, you get the same effect as setting {\bf UseVolumeOnce = yes}.
2478 The value defined by this directive in the bacula-dir.conf
2479 file is the default value used when a Volume is created. Once the volume is
2480 created, changing the value in the bacula-dir.conf file will not change what
2481 is stored for the Volume. To change the value for an existing Volume you
2482 must use the {\bf update} command in the Console.
2484 If you are running multiple simultaneous jobs, this directive may not
2485 work correctly because when a drive is reserved for a job, this
2486 directive is not taken into account, so multiple jobs may try to
2487 start writing to the Volume. At some point, when the Media record is
2488 updated, multiple simultaneous jobs may fail since the Volume can no
2491 \item [Maximum Volume Files = \lt{}positive-integer\gt{}]
2492 \index[dir]{Maximum Volume Files}
2493 \index[dir]{Directive!Maximum Volume Files}
2494 This directive specifies the maximum number of files that can be written
2495 to the Volume. If you specify zero (the default), there is no limit.
2496 Otherwise, when the number of files written to the Volume equals {\bf
2497 positive-integer} the Volume will be marked {\bf Used}. When the Volume
2498 is marked {\bf Used} it can no longer be used for appending Jobs, much
2499 like the {\bf Full} status but it can be recycled if recycling is
2500 enabled and thus used again. This value is checked and the {\bf Used}
2501 status is set only at the end of a job that writes to the particular
2504 The value defined by this directive in the bacula-dir.conf file is the
2505 default value used when a Volume is created. Once the volume is
2506 created, changing the value in the bacula-dir.conf file will not change
2507 what is stored for the Volume. To change the value for an existing
2508 Volume you must use the {\bf update} command in the Console.
2510 \item [Maximum Volume Bytes = \lt{}size\gt{}]
2511 \index[dir]{Maximum Volume Bytes}
2512 \index[dir]{Directive!Maximum Volume Bytes}
2513 This directive specifies the maximum number of bytes that can be written
2514 to the Volume. If you specify zero (the default), there is no limit
2515 except the physical size of the Volume. Otherwise, when the number of
2516 bytes written to the Volume equals {\bf size} the Volume will be marked
2517 {\bf Used}. When the Volume is marked {\bf Used} it can no longer be
2518 used for appending Jobs, much like the {\bf Full} status but it can be
2519 recycled if recycling is enabled, and thus the Volume can be re-used
2520 after recycling. This value is checked and the {\bf Used} status set
2521 while the job is writing to the particular volume.
2523 This directive is particularly useful for restricting the size
2524 of disk volumes, and will work correctly even in the case of
2525 multiple simultaneous jobs writing to the volume.
2527 The value defined by this directive in the bacula-dir.conf file is the
2528 default value used when a Volume is created. Once the volume is
2529 created, changing the value in the bacula-dir.conf file will not change
2530 what is stored for the Volume. To change the value for an existing
2531 Volume you must use the {\bf update} command in the Console.
2533 \item [Volume Use Duration = \lt{}time-period-specification\gt{}]
2534 \index[dir]{Volume Use Duration}
2535 \index[dir]{Directive!Volume Use Duration}
2536 The Volume Use Duration directive defines the time period that the
2537 Volume can be written beginning from the time of first data write to the
2538 Volume. If the time-period specified is zero (the default), the Volume
2539 can be written indefinitely. Otherwise, the next time a job
2540 runs that wants to access this Volume, and the time period from the
2541 first write to the volume (the first Job written) exceeds the
2542 time-period-specification, the Volume will be marked {\bf Used}, which
2543 means that no more Jobs can be appended to the Volume, but it may be
2544 recycled if recycling is enabled. Using the command {\bf
2545 status dir} applies algorithms similar to running jobs, so
2546 during such a command, the Volume status may also be changed.
2548 recycled, it will be available for use again.
2550 You might use this directive, for example, if you have a Volume used for
2551 Incremental backups, and Volumes used for Weekly Full backups. Once the
2552 Full backup is done, you will want to use a different Incremental
2553 Volume. This can be accomplished by setting the Volume Use Duration for
2554 the Incremental Volume to six days. I.e. it will be used for the 6
2555 days following a Full save, then a different Incremental volume will be
2556 used. Be careful about setting the duration to short periods such as 23
2557 hours, or you might experience problems of Bacula waiting for a tape
2558 over the weekend only to complete the backups Monday morning when an
2559 operator mounts a new tape.
2561 The use duration is checked and the {\bf Used} status is set only at the
2562 end of a job that writes to the particular volume, which means that even
2563 though the use duration may have expired, the catalog entry will not be
2564 updated until the next job that uses this volume is run. This
2565 directive is not intended to be used to limit volume sizes
2566 and will not work correctly (i.e. will fail jobs) if the use
2567 duration expires while multiple simultaneous jobs are writing
2570 Please note that the value defined by this directive in the bacula-dir.conf
2571 file is the default value used when a Volume is created. Once the volume is
2572 created, changing the value in the bacula-dir.conf file will not change what
2573 is stored for the Volume. To change the value for an existing Volume you
2575 \ilink{\bf update volume}{UpdateCommand} command in the Console.
2577 \item [Catalog Files = \lt{}yes|no\gt{}]
2578 \index[dir]{Catalog Files}
2579 \index[dir]{Directive!Catalog Files}
2580 This directive defines whether or not you want the names of the files
2581 that were saved to be put into the catalog. The default is {\bf yes}.
2582 The advantage of specifying {\bf Catalog Files = No} is that you will
2583 have a significantly smaller Catalog database. The disadvantage is that
2584 you will not be able to produce a Catalog listing of the files backed up
2585 for each Job (this is often called Browsing). Also, without the File
2586 entries in the catalog, you will not be able to use the Console {\bf
2587 restore} command nor any other command that references File entries.
2589 \label{PoolAutoPrune}
2590 \item [AutoPrune = \lt{}yes|no\gt{}]
2591 \index[dir]{AutoPrune}
2592 \index[dir]{Directive!AutoPrune}
2593 If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or
2594 greater) will automatically apply the Volume Retention period when new
2595 Volume is needed and no appendable Volumes exist in the Pool. Volume
2596 pruning causes expired Jobs (older than the {\bf Volume Retention}
2597 period) to be deleted from the Catalog and permits possible recycling of
2600 \label{VolRetention}
2601 \item [Volume Retention = \lt{}time-period-specification\gt{}]
2602 \index[dir]{Volume Retention}
2603 \index[dir]{Directive!Volume Retention}
2604 The Volume Retention directive defines the length of time that {\bf
2605 Bacula} will keep records associated with the Volume in
2606 the Catalog database after the End time of each Job written to the
2607 Volume. When this time period expires, and if {\bf AutoPrune} is set to
2608 {\bf yes} Bacula may prune (remove) Job records that are older than the
2609 specified Volume Retention period if it is necessary to free up a
2610 Volume. Recycling will not occur until it is absolutely necessary to
2611 free up a volume (i.e. no other writable volume exists).
2612 All File records associated with pruned Jobs are also
2613 pruned. The time may be specified as seconds, minutes, hours, days,
2614 weeks, months, quarters, or years. The {\bf Volume Retention} is
2615 applied independently of the {\bf Job Retention} and the {\bf File
2616 Retention} periods defined in the Client resource. This means that all
2617 the retentions periods are applied in turn and that the shorter period
2618 is the one that effectively takes precedence. Note, that when the {\bf
2619 Volume Retention} period has been reached, and it is necessary to obtain
2620 a new volume, Bacula will prune both the Job and the File records. This
2621 pruning could also occur during a {\bf status dir} command because it
2622 uses similar algorithms for finding the next available Volume.
2624 It is important to know that when the Volume Retention period expires,
2625 Bacula does not automatically recycle a Volume. It attempts to keep the
2626 Volume data intact as long as possible before over writing the Volume.
2629 By defining multiple Pools with different Volume Retention periods, you
2630 may effectively have a set of tapes that is recycled weekly, another
2631 Pool of tapes that is recycled monthly and so on. However, one must
2632 keep in mind that if your {\bf Volume Retention} period is too short, it
2633 may prune the last valid Full backup, and hence until the next Full
2634 backup is done, you will not have a complete backup of your system, and
2635 in addition, the next Incremental or Differential backup will be
2636 promoted to a Full backup. As a consequence, the minimum {\bf Volume
2637 Retention} period should be at twice the interval of your Full backups.
2638 This means that if you do a Full backup once a month, the minimum Volume
2639 retention period should be two months.
2641 The default Volume retention period is 365 days, and either the default
2642 or the value defined by this directive in the bacula-dir.conf file is
2643 the default value used when a Volume is created. Once the volume is
2644 created, changing the value in the bacula-dir.conf file will not change
2645 what is stored for the Volume. To change the value for an existing
2646 Volume you must use the {\bf update} command in the Console.
2648 \label{PoolRecyclePool}
2649 \item [RecyclePool = \lt{}pool-resource-name\gt{}]
2650 \index[dir]{RecyclePool}
2651 \index[dir]{Directive!RecyclePool}
2652 On versions 2.1.4 or greater, this directive defines to which pool
2653 the Volume will be placed (moved) when it is recycled. Without
2654 this directive, a Volume will remain in the same pool when it is
2655 recycled. With this directive, it can be moved automatically to any
2656 existing pool during a recycle. This directive is probably most
2657 useful when defined in the Scratch pool, so that volumes will
2658 be recycled back into the Scratch pool. For more on the see the
2659 \ilink{Scratch Pool}{TheScratchPool} section of this manual.
2661 Although this directive is called RecyclePool, the Volume in
2662 question is actually moved from its current pool to the one
2663 you specify on this directive when Bacula prunes the Volume and
2664 discovers that there are no records left in the catalog and hence
2665 marks it as {\bf Purged}.
2669 \item [Recycle = \lt{}yes|no\gt{}]
2670 \index[dir]{Recycle}
2671 \index[dir]{Directive!Recycle}
2672 This directive specifies whether or not Purged Volumes may be recycled.
2673 If it is set to {\bf yes} (default) and Bacula needs a volume but finds
2674 none that are appendable, it will search for and recycle (reuse) Purged
2675 Volumes (i.e. volumes with all the Jobs and Files expired and thus
2676 deleted from the Catalog). If the Volume is recycled, all previous data
2677 written to that Volume will be overwritten. If Recycle is set to {\bf
2678 no}, the Volume will not be recycled, and hence, the data will remain
2679 valid. If you want to reuse (re-write) the Volume, and the recycle flag
2680 is no (0 in the catalog), you may manually set the recycle flag (update
2681 command) for a Volume to be reused.
2683 Please note that the value defined by this directive in the
2684 bacula-dir.conf file is the default value used when a Volume is created.
2685 Once the volume is created, changing the value in the bacula-dir.conf
2686 file will not change what is stored for the Volume. To change the value
2687 for an existing Volume you must use the {\bf update} command in the
2690 When all Job and File records have been pruned or purged from the
2691 catalog for a particular Volume, if that Volume is marked as
2692 Append, Full, Used, or Error, it will then be marked as Purged. Only
2693 Volumes marked as Purged will be considered to be converted to the
2694 Recycled state if the {\bf Recycle} directive is set to {\bf yes}.
2697 \label{RecycleOldest}
2698 \item [Recycle Oldest Volume = \lt{}yes|no\gt{}]
2699 \index[dir]{Recycle Oldest Volume}
2700 \index[dir]{Directive!Recycle Oldest Volume}
2701 This directive instructs the Director to search for the oldest used
2702 Volume in the Pool when another Volume is requested by the Storage
2703 daemon and none are available. The catalog is then {\bf pruned}
2704 respecting the retention periods of all Files and Jobs written to this
2705 Volume. If all Jobs are pruned (i.e. the volume is Purged), then the
2706 Volume is recycled and will be used as the next Volume to be written.
2707 This directive respects any Job, File, or Volume retention periods that
2708 you may have specified, and as such it is {\bf much} better to use this
2709 directive than the Purge Oldest Volume.
2711 This directive can be useful if you have a fixed number of Volumes in the
2712 Pool and you want to cycle through them and you have specified the correct
2715 However, if you use this directive and have only one
2716 Volume in the Pool, you will immediately recycle your Volume if you fill
2717 it and Bacula needs another one. Thus your backup will be totally invalid.
2718 Please use this directive with care. The default is {\bf no}.
2720 \label{RecycleCurrent}
2722 \item [Recycle Current Volume = \lt{}yes|no\gt{}]
2723 \index[dir]{Recycle Current Volume}
2724 \index[dir]{Directive!Recycle Current Volume}
2725 If Bacula needs a new Volume, this directive instructs Bacula to Prune
2726 the volume respecting the Job and File retention periods. If all Jobs
2727 are pruned (i.e. the volume is Purged), then the Volume is recycled and
2728 will be used as the next Volume to be written. This directive respects
2729 any Job, File, or Volume retention periods that you may have specified,
2730 and thus it is {\bf much} better to use it rather than the Purge Oldest
2733 This directive can be useful if you have: a fixed number of Volumes in
2734 the Pool, you want to cycle through them, and you have specified
2735 retention periods that prune Volumes before you have cycled through the
2738 However, if you use this directive and have only one Volume in the Pool,
2739 you will immediately recycle your Volume if you fill it and Bacula needs
2740 another one. Thus your backup will be totally invalid. Please use this
2741 directive with care. The default is {\bf no}.
2745 \item [Purge Oldest Volume = \lt{}yes|no\gt{}]
2746 \index[dir]{Purge Oldest Volume}
2747 \index[dir]{Directive!Purge Oldest Volume}
2748 This directive instructs the Director to search for the oldest used
2749 Volume in the Pool when another Volume is requested by the Storage
2750 daemon and none are available. The catalog is then {\bf purged}
2751 irrespective of retention periods of all Files and Jobs written to this
2752 Volume. The Volume is then recycled and will be used as the next Volume
2753 to be written. This directive overrides any Job, File, or Volume
2754 retention periods that you may have specified.
2756 This directive can be useful if you have a fixed number of Volumes in
2757 the Pool and you want to cycle through them and reusing the oldest one
2758 when all Volumes are full, but you don't want to worry about setting
2759 proper retention periods. However, by using this option you risk losing
2762 Please be aware that {\bf Purge Oldest Volume} disregards all retention
2763 periods. If you have only a single Volume defined and you turn this
2764 variable on, that Volume will always be immediately overwritten when it
2765 fills! So at a minimum, ensure that you have a decent number of Volumes
2766 in your Pool before running any jobs. If you want retention periods to
2767 apply do not use this directive. To specify a retention period, use the
2768 {\bf Volume Retention} directive (see above).
2770 We {\bf highly} recommend against using this directive, because it is
2771 sure that some day, Bacula will recycle a Volume that contains current
2772 data. The default is {\bf no}.
2774 \item [Cleaning Prefix = \lt{}string\gt{}]
2775 \index[dir]{Cleaning Prefix}
2776 \index[dir]{Directive!Cleaning Prefix}
2777 This directive defines a prefix string, which if it matches the
2778 beginning of a Volume name during labeling of a Volume, the Volume will
2779 be defined with the VolStatus set to {\bf Cleaning} and thus Bacula will
2780 never attempt to use this tape. This is primarily for use with
2781 autochangers that accept barcodes where the convention is that barcodes
2782 beginning with {\bf CLN} are treated as cleaning tapes.
2785 \item [Label Format = \lt{}format\gt{}]
2786 \index[dir]{Label Format}
2787 \index[dir]{Directive!Label Format}
2788 This directive specifies the format of the labels contained in this
2789 pool. The format directive is used as a sort of template to create new
2790 Volume names during automatic Volume labeling.
2792 The {\bf format} should be specified in double quotes, and consists of
2793 letters, numbers and the special characters hyphen ({\bf -}), underscore
2794 ({\bf \_}), colon ({\bf :}), and period ({\bf .}), which are the legal
2795 characters for a Volume name. The {\bf format} should be enclosed in
2798 In addition, the format may contain a number of variable expansion
2799 characters which will be expanded by a complex algorithm allowing you to
2800 create Volume names of many different formats. In all cases, the
2801 expansion process must resolve to the set of characters noted above that
2802 are legal Volume names. Generally, these variable expansion characters
2803 begin with a dollar sign ({\bf \$}) or a left bracket ({\bf [}). If you
2804 specify variable expansion characters, you should always enclose the
2805 format with double quote characters ({\bf "}). For more details on
2806 variable expansion, please see the \ilink{Variable
2807 Expansion}{VarsChapter} Chapter of this manual.
2809 If no variable expansion characters are found in the string, the Volume
2810 name will be formed from the {\bf format} string appended with the
2811 number of volumes in the pool plus one, which will be edited as four
2812 digits with leading zeros. For example, with a {\bf Label Format =
2813 "File-"}, the first volumes will be named {\bf File-0001}, {\bf
2816 With the exception of Job specific variables, you can test your {\bf
2817 LabelFormat} by using the \ilink{ var command}{var} the Console Chapter
2820 In almost all cases, you should enclose the format specification (part
2821 after the equal sign) in double quotes. Please note that this directive
2822 is deprecated and is replaced in version 1.37 and greater with a Python
2823 script for creating volume names.
2827 In order for a Pool to be used during a Backup Job, the Pool must have at
2828 least one Volume associated with it. Volumes are created for a Pool using
2829 the {\bf label} or the {\bf add} commands in the {\bf Bacula Console},
2830 program. In addition to adding Volumes to the Pool (i.e. putting the
2831 Volume names in the Catalog database), the physical Volume must be labeled
2832 with a valid Bacula software volume label before {\bf Bacula} will accept
2833 the Volume. This will be automatically done if you use the {\bf label}
2834 command. Bacula can automatically label Volumes if instructed to do so,
2835 but this feature is not yet fully implemented.
2837 The following is an example of a valid Pool resource definition:
2849 \subsection{The Scratch Pool}
2850 \label{TheScratchPool}
2851 \index[general]{Scratch Pool}
2852 In general, you can give your Pools any name you wish, but there is one
2853 important restriction: the Pool named {\bf Scratch}, if it exists behaves
2854 like a scratch pool of Volumes in that when Bacula needs a new Volume for
2855 writing and it cannot find one, it will look in the Scratch pool, and if
2856 it finds an available Volume, it will move it out of the Scratch pool into
2857 the Pool currently being used by the job.
2860 \section{The Catalog Resource}
2861 \label{CatalogResource}
2862 \index[general]{Resource!Catalog}
2863 \index[general]{Catalog Resource}
2865 The Catalog Resource defines what catalog to use for the current job.
2866 Currently, Bacula can only handle a single database server (SQLite, MySQL,
2867 PostgreSQL) that is defined when configuring {\bf Bacula}. However, there
2868 may be as many Catalogs (databases) defined as you wish. For example, you
2869 may want each Client to have its own Catalog database, or you may want
2870 backup jobs to use one database and verify or restore jobs to use another
2873 Since SQLite is compiled in, it always runs on the same machine
2874 as the Director and the database must be directly accessible (mounted) from
2875 the Director. However, since both MySQL and PostgreSQL are networked
2876 databases, they may reside either on the same machine as the Director
2877 or on a different machine on the network. See below for more details.
2882 \index[dir]{Catalog}
2883 \index[dir]{Directive!Catalog}
2884 Start of the Catalog resource. At least one Catalog resource must be
2888 \item [Name = \lt{}name\gt{}]
2890 \index[dir]{Directive!Name}
2891 The name of the Catalog. No necessary relation to the database server
2892 name. This name will be specified in the Client resource directive
2893 indicating that all catalog data for that Client is maintained in this
2894 Catalog. This directive is required.
2896 \item [password = \lt{}password\gt{}]
2897 \index[dir]{password}
2898 \index[dir]{Directive!password}
2899 This specifies the password to use when logging into the database. This
2900 directive is required.
2902 \item [DB Name = \lt{}name\gt{}]
2903 \index[dir]{DB Name}
2904 \index[dir]{Directive!DB Name}
2905 This specifies the name of the database. If you use multiple catalogs
2906 (databases), you specify which one here. If you are using an external
2907 database server rather than the internal one, you must specify a name
2908 that is known to the server (i.e. you explicitly created the Bacula
2909 tables using this name. This directive is required.
2911 \item [user = \lt{}user\gt{}]
2913 \index[dir]{Directive!user}
2914 This specifies what user name to use to log into the database. This
2915 directive is required.
2917 \item [DB Socket = \lt{}socket-name\gt{}]
2918 \index[dir]{DB Socket}
2919 \index[dir]{Directive!DB Socket}
2920 This is the name of a socket to use on the local host to connect to the
2921 database. This directive is used only by MySQL and is ignored by SQLite.
2922 Normally, if neither {\bf DB Socket} or {\bf DB Address} are specified, MySQL
2923 will use the default socket. If the DB Socket is specified, the
2924 MySQL server must reside on the same machine as the Director.
2926 \item [DB Address = \lt{}address\gt{}]
2927 \index[dir]{DB Address}
2928 \index[dir]{Directive!DB Address}
2929 This is the host address of the database server. Normally, you would specify
2930 this instead of {\bf DB Socket} if the database server is on another machine.
2931 In that case, you will also specify {\bf DB Port}. This directive is used
2932 only by MySQL and PostgreSQL and is ignored by SQLite if provided.
2933 This directive is optional.
2935 \item [DB Port = \lt{}port\gt{}]
2936 \index[dir]{DB Port}
2937 \index[dir]{Directive!DB Port}
2938 This defines the port to be used in conjunction with {\bf DB Address} to
2939 access the database if it is on another machine. This directive is used only
2940 by MySQL and PostgreSQL and is ignored by SQLite if provided. This
2941 directive is optional.
2943 %% \item [Multiple Connections = \lt{}yes|no\gt{}]
2944 %% \index[dir]{Multiple Connections}
2945 %% \index[dir]{Directive!Multiple Connections}
2946 %% By default, this directive is set to no. In that case, each job that uses
2948 %% same Catalog will use a single connection to the catalog. It will be shared,
2949 %% and Bacula will allow only one Job at a time to communicate. If you set this
2950 %% directive to yes, Bacula will permit multiple connections to the database,
2951 %% and the database must be multi-thread capable. For SQLite and PostgreSQL,
2952 %% this is no problem. For MySQL, you must be *very* careful to have the
2953 %% multi-thread version of the client library loaded on your system. When this
2954 %% directive is set yes, each Job will have a separate connection to the
2955 %% database, and the database will control the interaction between the
2957 %% Jobs. This can significantly speed up the database operations if you are
2958 %% running multiple simultaneous jobs. In addition, for SQLite and PostgreSQL,
2959 %% Bacula will automatically enable transactions. This can significantly speed
2960 %% up insertion of attributes in the database either for a single Job or
2961 %% multiple simultaneous Jobs.
2963 %% This directive has not been tested. Please test carefully before running it
2964 %% in production and report back your results.
2968 The following is an example of a valid Catalog resource definition:
2977 password = "" # no password = no security
2982 or for a Catalog on another machine:
2992 DB Address = remote.acme.com
2998 \section{The Messages Resource}
2999 \label{MessagesResource2}
3000 \index[general]{Resource!Messages}
3001 \index[general]{Messages Resource}
3003 For the details of the Messages Resource, please see the
3004 \ilink{Messages Resource Chapter}{MessagesChapter} of this
3007 \section{The Console Resource}
3008 \label{ConsoleResource1}
3009 \index[general]{Console Resource}
3010 \index[general]{Resource!Console}
3012 As of Bacula version 1.33 and higher, there are three different kinds of
3013 consoles, which the administrator or user can use to interact with the
3014 Director. These three kinds of consoles comprise three different security
3018 \item The first console type is an {\bf anonymous} or {\bf default} console,
3019 which has full privileges. There is no console resource necessary for
3020 this type since the password is specified in the Director's resource and
3021 consequently such consoles do not have a name as defined on a {\bf Name
3022 =} directive. This is the kind of console that was initially
3023 implemented in versions prior to 1.33 and remains valid. Typically you
3024 would use it only for administrators.
3026 \item The second type of console, and new to version 1.33 and higher is a
3027 "named" console defined within a Console resource in both the Director's
3028 configuration file and in the Console's configuration file. Both the
3029 names and the passwords in these two entries must match much as is the
3030 case for Client programs.
3032 This second type of console begins with absolutely no privileges except
3033 those explicitly specified in the Director's Console resource. Thus you
3034 can have multiple Consoles with different names and passwords, sort of
3035 like multiple users, each with different privileges. As a default,
3036 these consoles can do absolutely nothing -- no commands whatsoever. You
3037 give them privileges or rather access to commands and resources by
3038 specifying access control lists in the Director's Console resource. The
3039 ACLs are specified by a directive followed by a list of access names.
3040 Examples of this are shown below.
3042 \item The third type of console is similar to the above mentioned one in that
3043 it requires a Console resource definition in both the Director and the
3044 Console. In addition, if the console name, provided on the {\bf Name =}
3045 directive, is the same as a Client name, that console is permitted to
3046 use the {\bf SetIP} command to change the Address directive in the
3047 Director's client resource to the IP address of the Console. This
3048 permits portables or other machines using DHCP (non-fixed IP addresses)
3049 to "notify" the Director of their current IP address.
3052 The Console resource is optional and need not be specified. The following
3053 directives are permitted within the Director's configuration resource:
3057 \item [Name = \lt{}name\gt{}]
3059 \index[dir]{Directive!Name}
3060 The name of the console. This name must match the name specified in the
3061 Console's configuration resource (much as is the case with Client
3064 \item [Password = \lt{}password\gt{}]
3065 \index[dir]{Password}
3066 \index[dir]{Directive!Password}
3067 Specifies the password that must be supplied for a named Bacula Console
3068 to be authorized. The same password must appear in the {\bf Console}
3069 resource of the Console configuration file. For added security, the
3070 password is never actually passed across the network but rather a
3071 challenge response hash code created with the password. This directive
3072 is required. If you have either {\bf /dev/random} {\bf bc} on your
3073 machine, Bacula will generate a random password during the configuration
3074 process, otherwise it will be left blank.
3076 The password is plain text. It is not generated through any special
3077 process. However, it is preferable for security reasons to choose
3080 \item [JobACL = \lt{}name-list\gt{}]
3082 \index[dir]{Directive!JobACL}
3083 This directive is used to specify a list of Job resource names that can
3084 be accessed by the console. Without this directive, the console cannot
3085 access any of the Director's Job resources. Multiple Job resource names
3086 may be specified by separating them with commas, and/or by specifying
3087 multiple JobACL directives. For example, the directive may be specified
3092 JobACL = kernsave, "Backup client 1", "Backup client 2"
3093 JobACL = "RestoreFiles"
3098 With the above specification, the console can access the Director's resources
3099 for the four jobs named on the JobACL directives, but for no others.
3101 \item [ClientACL = \lt{}name-list\gt{}]
3102 \index[dir]{ClientACL}
3103 \index[dir]{Directive!ClientACL}
3104 This directive is used to specify a list of Client resource names that can
3106 accessed by the console.
3108 \item [StorageACL = \lt{}name-list\gt{}]
3109 \index[dir]{StorageACL}
3110 \index[dir]{Directive!StorageACL}
3111 This directive is used to specify a list of Storage resource names that can
3112 be accessed by the console.
3114 \item [ScheduleACL = \lt{}name-list\gt{}]
3115 \index[dir]{ScheduleACL}
3116 \index[dir]{Directive!ScheduleACL}
3117 This directive is used to specify a list of Schedule resource names that can
3118 be accessed by the console.
3120 \item [PoolACL = \lt{}name-list\gt{}]
3121 \index[dir]{PoolACL}
3122 \index[dir]{Directive!PoolACL}
3123 This directive is used to specify a list of Pool resource names that can be
3124 accessed by the console.
3126 \item [FileSetACL = \lt{}name-list\gt{}]
3127 \index[dir]{FileSetACL}
3128 \index[dir]{Directive!FileSetACL}
3129 This directive is used to specify a list of FileSet resource names that
3130 can be accessed by the console.
3132 \item [CatalogACL = \lt{}name-list\gt{}]
3133 \index[dir]{CatalogACL}
3134 \index[dir]{Directive!CatalogACL}
3135 This directive is used to specify a list of Catalog resource names that
3136 can be accessed by the console.
3138 \item [CommandACL = \lt{}name-list\gt{}]
3139 \index[dir]{CommandACL}
3140 \index[dir]{Directive!CommandACL}
3141 This directive is used to specify a list of of console commands that can
3142 be executed by the console.
3144 \item [WhereACL = \lt{}string\gt{}]
3145 \index[dir]{WhereACL}
3146 \index[dir]{Directive!WhereACL}
3147 This directive permits you to specify where a restricted console
3148 can restore files. If this directive is not specified, only the
3149 default restore location is permitted (normally {\bf
3150 /tmp/bacula-restores}. If {\bf *all*} is specified any path the
3151 user enters will be accepted (not very secure), any other
3152 value specified (there may be multiple WhereACL directives) will
3153 restrict the user to use that path. For example, on a Unix system,
3154 if you specify "/", the file will be restored to the original
3155 location. This directive is untested.
3159 Aside from Director resource names and console command names, the special
3160 keyword {\bf *all*} can be specified in any of the above access control lists.
3161 When this keyword is present, any resource or command name (which ever is
3162 appropriate) will be accepted. For an example configuration file, please see
3164 \ilink{Console Configuration}{ConsoleConfChapter} chapter of this
3167 \section{The Counter Resource}
3168 \label{CounterResource}
3169 \index[general]{Resource!Counter}
3170 \index[general]{Counter Resource}
3172 The Counter Resource defines a counter variable that can be accessed by
3173 variable expansion used for creating Volume labels with the {\bf LabelFormat}
3175 \ilink{LabelFormat}{Label} directive in this chapter for more
3181 \index[dir]{Counter}
3182 \index[dir]{Directive!Counter}
3183 Start of the Counter resource. Counter directives are optional.
3185 \item [Name = \lt{}name\gt{}]
3187 \index[dir]{Directive!Name}
3188 The name of the Counter. This is the name you will use in the variable
3189 expansion to reference the counter value.
3191 \item [Minimum = \lt{}integer\gt{}]
3192 \index[dir]{Minimum}
3193 \index[dir]{Directive!Minimum}
3194 This specifies the minimum value that the counter can have. It also becomes
3195 the default. If not supplied, zero is assumed.
3197 \item [Maximum = \lt{}integer\gt{}]
3198 \index[dir]{Maximum}
3199 \index[dir]{Directive!Maximum}
3200 \index[dir]{Directive!Maximum}
3201 This is the maximum value value that the counter can have. If not specified
3202 or set to zero, the counter can have a maximum value of 2,147,483,648 (2 to
3203 the 31 power). When the counter is incremented past this value, it is reset
3206 \item [*WrapCounter = \lt{}counter-name\gt{}]
3207 \index[dir]{*WrapCounter}
3208 \index[dir]{Directive!*WrapCounter}
3209 If this value is specified, when the counter is incremented past the
3211 and thus reset to the minimum, the counter specified on the {\bf WrapCounter}
3212 is incremented. (This is not currently implemented).
3214 \item [Catalog = \lt{}catalog-name\gt{}]
3215 \index[dir]{Catalog}
3216 \index[dir]{Directive!Catalog}
3217 If this directive is specified, the counter and its values will be saved in
3218 the specified catalog. If this directive is not present, the counter will be
3219 redefined each time that Bacula is started.
3222 \section{Example Director Configuration File}
3223 \label{SampleDirectorConfiguration}
3224 \index[general]{File!Example Director Configuration}
3225 \index[general]{Example Director Configuration File}
3227 An example Director configuration file might be the following:
3232 # Default Bacula Director Configuration file
3234 # The only thing that MUST be changed is to add one or more
3235 # file or directory names in the Include directive of the
3238 # For Bacula release 1.15 (5 March 2002) -- redhat
3240 # You might also want to change the default email address
3241 # from root to your address. See the "mail" and "operator"
3242 # directives in the Messages resource.
3244 Director { # define myself
3246 QueryFile = "/home/kern/bacula/bin/query.sql"
3247 WorkingDirectory = "/home/kern/bacula/bin/working"
3248 PidDirectory = "/home/kern/bacula/bin/working"
3249 Password = "XkSfzu/Cf/wX4L8Zh4G4/yhCbpLcz3YVdmVoQvU3EyF/"
3251 # Define the backup Job
3253 Name = "NightlySave"
3255 Level = Incremental # default
3258 Schedule = "WeeklyCycle"
3268 Where = /tmp/bacula-restores
3274 # List of files to be backed up
3278 Options { signature=SHA1}
3280 # Put your list of files here, one per line or include an
3281 # external list with:
3285 # Note: / backs up everything
3290 # When to do the backups
3292 Name = "WeeklyCycle"
3293 Run = level=Full sun at 2:05
3294 Run = level=Incremental mon-sat at 2:05
3296 # Client (File Services) to backup
3301 Password = "MQk6lVinz4GG2hdIZk1dsKE/LxMZGo6znMHiD7t7vzF+"
3302 File Retention = 60d # sixty day file retention
3303 Job Retention = 1y # 1 year Job retention
3304 AutoPrune = yes # Auto apply retention periods
3306 # Definition of DLT tape storage device
3310 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
3311 Device = "HP DLT 80" # same as Device in Storage daemon
3312 Media Type = DLT8000 # same as MediaType in Storage daemon
3314 # Definition for a DLT autochanger device
3318 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
3319 Device = "Autochanger" # same as Device in Storage daemon
3320 Media Type = DLT-8000 # Different from DLTDrive
3323 # Definition of DDS tape storage device
3327 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
3328 Device = SDT-10000 # same as Device in Storage daemon
3329 Media Type = DDS-4 # same as MediaType in Storage daemon
3331 # Definition of 8mm tape storage device
3335 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
3336 Device = "Exabyte 8mm"
3339 # Definition of file storage device
3343 Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
3344 Device = FileStorage
3347 # Generic catalog service
3350 dbname = bacula; user = bacula; password = ""
3352 # Reasonable message delivery -- send most everything to
3353 # the email address and to the console
3356 mail = root@localhost = all, !skipped, !terminate
3357 operator = root@localhost = mount
3358 console = all, !skipped, !saved
3361 # Default pool definition
3369 # Restricted console used by tray-monitor to get the status of the director
3373 Password = "GN0uRo7PTUmlMbqrJ2Gr1p0fk0HQJTxwnFyE4WSST3MWZseR"
3374 CommandACL = status, .status