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