Debian Codegraph @

manuals/en/main/filedconf.tex

raw
1 \chapter{Client/File daemon Configuration}
2 \label{blb:FiledConfChapter}
3 \label{blb:director:configure:filedaemon}
4 \index[general]{Configuration!Client/File daemon }
5 \index[general]{Client/File daemon Configuration }
6
7 The Client (or File Daemon) Configuration is one of the simpler ones to
8 specify. Generally, other than changing the Client name so that error messages
9 are easily identified, you will not need to modify the default Client
10 configuration file.
11
12 For a general discussion of configuration file and resources including the
13 data types recognized by \bacula{}, please see the
14 \bilink{Configuration}{blb:ConfigureChapter} chapter of this manual. The
15 following Client Resource definitions must be defined:
16
17 \begin{bitemize}
18 \item
19 \bilink{Client}{blb:ClientResource2} -- to define what Clients are to
20 be backed up.
21 \item
22 \bilink{Director}{blb:DirectorResource4} -- to define the Director's
23 name and its access password.
24 \item
25 \bilink{Messages}{blb:MessagesChapter} -- to define where error and
26 information messages are to be sent.
27 \end{bitemize}
28
29 \section{The Client Resource}
30 \label{blb:ClientResource2}
31 \index[general]{Resource!Client }
32 \index[general]{Client Resource }
33
34 The Client Resource (or FileDaemon) resource defines the name of the Client
35 (as used by the Director) as well as the port on which the Client listens for
36 Director connections.
37
38 \begin{bdescription}
39
40 \item [Client (or FileDaemon)]
41 \index[fd]{Client (or FileDaemon)}
42 \index[fd]{Directive!Client (or FileDaemon)}
43 Start of the Client records. There must be one and only one Client resource
44 in the configuration file, since it defines the properties of the current
45 client program.
46
47 \bwebdoc{FileDaemon:FileDaemon:Name}
48 \item [Name = \bbracket{name}]
49 \index[fd]{Name}
50 \index[fd]{Directive!Name}
51 The client name that must be used by the Director when connecting. Generally,
52 it is a good idea to use a name related to the machine so that error messages
53 can be easily identified if you have multiple Clients. This directive is
54 required.
55
56 \bwebdoc{FileDaemon:FileDaemon:WorkingDirectory}
57 \item [Working Directory = \bbracket{Directory}]
58 \index[fd]{Working Directory}
59 \index[fd]{Directive!Working Directory}
60 This directive is mandatory and specifies a directory in which the File
61 daemon may put its status files. This directory should be used only by
62 \bacula{}, but may be shared by other \bacula{} daemons provided the daemon
63 names on the \bdirectivename{Name} definition are unique for each daemon. This directive
64 is required.
65
66 On Win32 systems, in some circumstances you may need to specify a drive
67 letter in the specified working directory path. Also, please be sure
68 that this directory is writable by the SYSTEM user otherwise restores
69 may fail (the bootstrap file that is transferred to the File daemon from
70 the Director is temporarily put in this directory before being passed
71 to the Storage daemon).
72
73 \bwebdoc{FileDaemon:FileDaemon:PidDirectory}
74 \item [Pid Directory = \bbracket{Directory}]
75 \index[fd]{Pid Directory}
76 \index[fd]{Directive!Pid Directory}
77 This directive is mandatory and specifies a directory in which the File daemon
78 may put its process Id file files. The process Id file is used to shutdown
79 \bacula{} and to prevent multiple copies of \bacula{} from running simultaneously.
80 This record is required. Standard shell expansion of the \bbracket{Directory} is
81 done when the configuration file is read so that values such as \textbf{\$HOME}
82 will be properly expanded.
83
84 Typically on Linux systems, you will set this to: \bdirectoryname{/var/run}. If you are
85 not installing \bacula{} in the system directories, you can use the
86 \bdirectivename{Working Directory} as defined above.
87
88 \bwebdoc{FileDaemon:FileDaemon:DedupIndexDirectory}
89 \item [Dedup Index Directory = \bbracket{Directory}]
90 \index[fd]{Dedup Index Directory}
91 \index[fd]{Directive!Dedup Index Directory}
92 This directive is deprecated and replaced by ``\bdirectivename{Client Rehydration}''.
93 \smallskip{}
94
95 This directive is optional and specifies a directory in which the File Daemon
96 may put a index cache of all blocks read during a Backup job.
97
98 Standard shell expansion of the \bbracket{Directory} is done when the
99 configuration file is read so that values such as \textbf{\$HOME} will be
100 properly expanded.
101
102 \bwebdoc{FileDaemon:FileDaemon:ClientRehydration}
103 \item [ClientRehydration = \bbracket{Directory}]
104 \index[fd]{Client Rehydration}
105 \index[fd]{Directive!Client Rehydration}
106
107 This directive is optional and allows to try to do rehydration using
108 existing local data on the Client at restore time. In some cases, the use of
109 this directive permits to transfer less data over the network during a
110 restore. The default value is \bdefaultvalue{no}.
111
112
113 \bwebdoc{FileDaemon:FileDaemon:HeartbeatInterval}
114 \item [Heartbeat Interval = \bbracket{time-interval}]
115 \index[fd]{Heartbeat Interval}
116 \index[fd]{Directive!Heartbeat Interval}
117 \index[general]{Heartbeat Interval}
118 \index[general]{Broken pipe}
119 \index[general]{slow}
120 \index[general]{Backups!slow}
121 This record defines an interval of time in seconds. For each heartbeat that the
122 File daemon receives from the Storage daemon, it will forward it to the
123 Director. In addition, if no heartbeat has been received from the
124 Storage daemon and thus forwarded the File daemon will send a heartbeat
125 signal to the Director and to the Storage daemon to keep the channels
126 active. The default interval is \bdefaultvalue{300s}.
127 This feature is particularly useful if you have a router such as 3Com
128 that does not follow Internet standards and times out a valid
129 connection after a short duration despite the fact that keepalive is
130 set. This usually results in a broken pipe error message.
131
132 If you continue getting broken pipe error messages despite using the
133 Heartbeat Interval, and you are using Windows, you should consider
134 upgrading your ethernet driver. This is a known problem with NVidia
135 NForce 3 drivers (4.4.2 17/05/2004), or try the following workaround
136 suggested by Thomas Simmons for Win32 machines:
137
138 Browse to:
139 Start \textrightarrow{} Control Panel \textrightarrow{} Network Connections
140
141 Right click the connection for the nvidia adapter and select properties.
142 Under the General tab, click ``Configure\ldots''. Under the Advanced tab set
143 ``Checksum Offload'' to disabled and click OK to save the change.
144
145 Lack of communications, or communications that get interrupted can
146 also be caused by Linux firewalls where you have a rule that throttles
147 connections or traffic.
148
149
150 \bwebdoc{FileDaemon:FileDaemon:MaximumConcurrentJobs}
151 \item [Maximum Concurrent Jobs = \bbracket{number}]
152 \index[fd]{Maximum Concurrent Jobs}
153 \index[fd]{Directive!Maximum Concurrent Jobs}
154 where \bbracket{number} is the maximum number of Jobs that should run
155 concurrently. The default is set to \bdefaultvalue{20}, but you may set it to a larger
156 number. Each contact from the Director (e.g. status request, job start
157 request) is considered as a Job, so if you want to be able to do a
158 \bcommandname{status} request in the console at the same time as a Job is running, you
159 will need to set this value greater than \bvalue{1}. If set to a large value,
160 please be careful to have this value higher than the \bdirectivename{Maximum Concurrent Jobs}
161 configured in the \bresourcename{Client} resource in the Director configuration file.
162 Otherwise, backup jobs can fail due to the Director connection to FD be
163 refused because \acl{MCJ} was exceeded on FD side.
164
165 \item [Maximum Job Error Count = \bbracket{number}]
166 \index[fd]{Maximum Job Error Count}
167 \index[fd]{Directive!Maximum Job Error Count}
168 where \bbracket{number} is the error threshold for the Job, after reaching it Job will be failed.
169 The default value is 1000.
170 If this value is set to 0, job will continue to run no matter how many errors it encounters.
171
172 \bwebdoc{FileDaemon:FileDaemon:FdAddresses}
173 \item [FDAddresses = \bbracket{IP-address-specification}]
174 \index[fd]{FDAddresses}
175 \index[fd]{Directive!FDAddresses}
176 Specify the ports and addresses on which the File daemon listens for
177 Director connections. Probably the simplest way to explain is to show
178 an example:
179
180 \begin{bVerbatim}
181 FDAddresses = {
182 ip = { addr = 1.2.3.4; port = 1205; }
183 ipv4 = {
184 addr = 1.2.3.4; port = http; }
185 ipv6 = {
186 addr = 1.2.3.4;
187 port = 1205;
188 }
189 ip = {
190 addr = 1.2.3.4
191 port = 1205
192 }
193 ip = { addr = 1.2.3.4 }
194 ip = {
195 addr = 201:220:222::2
196 }
197 ip = {
198 addr = bluedot.thun.net
199 }
200 }
201 \end{bVerbatim}
202
203 where ip, ip4, ip6, addr, and port are all keywords. Note, that the address
204 can be specified as either a dotted quadruple, or IPv6 colon notation, or as
205 a symbolic name (only in the ip specification). Also, port can be specified
206 as a number or as the mnemonic value from the \bfilename{/etc/services} file. If a port
207 is not specified, the default will be used. If an ip section is specified,
208 the resolution can be made either by IPv4 or IPv6. If ip4 is specified, then
209 only IPv4 resolutions will be permitted, and likewise with ip6.
210
211 \bwebdoc{FileDaemon:FileDaemon:FdPort}
212 \item [FDPort = \bbracket{port-number}]
213 \index[fd]{FDPort}
214 \index[fd]{Directive!FDPort}
215 This specifies the port number on which the Client listens for Director
216 connections. It must agree with the FDPort specified in the Client resource
217 of the Director's configuration file. The default is \bdefaultvalue{9102}.
218
219 \bwebdoc{FileDaemon:FileDaemon:FdAddress}
220 \item [FDAddress = \bbracket{IP-Address}]
221 \index[fd]{FDAddress}
222 \index[fd]{Directive!FDAddress}
223 This record is optional, and if it is specified, it will cause the File
224 daemon server (for Director connections) to bind to the specified
225 \textbf{IP-Address}, which is either a domain name or an IP address specified as a
226 dotted quadruple. If this record is not specified, the File daemon will bind
227 to any available address (the default).
228
229 \bwebdoc{FileDaemon:FileDaemon:FdSourceAddress}
230 \item [FDSourceAddress = \bbracket{IP-Address}]
231 \index[fd]{FDSourceAddress}
232 \index[fd]{Directive!FDSourceAddress}
233 This record is optional, and if it is specified, it will cause the File
234 daemon server (for Storage connections) to bind to the specified
235 \textbf{IP-Address}, which is either a domain name or an IP address specified as a
236 dotted quadruple. If this record is not specified, the kernel will choose
237 the best address according to the routing table (the default).
238
239 \bwebdoc{FileDaemon:FileDaemon:SdConnectTimeout}
240 \item [SDConnectTimeout = \bbracket{time-interval}]
241 \index[fd]{SDConnectTimeout}
242 \index[fd]{Directive!SDConnectTimeout}
243 This record defines an interval of time that the File daemon will try to
244 connect to the Storage daemon. The default is \bdefaultvalue{30 minutes}. If no connection
245 is made in the specified time interval, the File daemon cancels the Job.
246
247 \bwebdoc{FileDaemon:FileDaemon:MaximumNetworkBufferSize}
248 \item [Maximum Network Buffer Size = \bbracket{bytes}]
249 \index[fd]{Maximum Network Buffer Size}
250 \index[fd]{Directive!Maximum Network Buffer Size}
251 where \bbracket{bytes} specifies the initial network buffer size to use with
252 the File daemon. This size will be adjusted down if it is too large until it
253 is accepted by the OS. Please use care in setting this value since if it is
254 too large, it will be trimmed by 512 bytes until the OS is happy, which may
255 require a large number of system calls. The default value is \bdefaultvalue{65,536} bytes.
256 The maximum value is \bdefaultvalue{1,000,000} bytes.
257
258 Note, on certain Windows machines, there are reports that the
259 transfer rates are very slow and this seems to be related to
260 the default \bdefaultvalue{65,536} size. On systems where the transfer rates
261 seem abnormally slow compared to other systems, you might try
262 setting the Maximum Network Buffer Size to 32,768 in both the
263 File daemon and in the Storage daemon.
264
265 \bwebdoc{FileDaemon:FileDaemon:MaximumBandwidthPerJob}
266 \item [Maximum Bandwidth Per Job = \bbracket{speed}]
267 \index[fd]{Maximum Bandwidth Per Job}
268 \index[fd]{Directive!Maximum Bandwidth Per Job}
269
270 The speed parameter specifies the maximum allowed bandwidth in bytes per
271 second that a job may use.
272 You may specify the following speed parameter modifiers:
273 \bvalue{kb/s} (1,000 bytes per second), \bvalue{k/s} (1,024 bytes per second),
274 \bvalue{mb/s} (1,000,000 bytes per second), or \bvalue{m/s} (1,048,576 bytes per second).
275
276 The use of TLS, TLS PSK, CommLine compression and Deduplication can interfer
277 with the value set with the Directive.
278
279 \bwebdoc{FileDaemon:FileDaemon:CommCompression}
280 \item[CommCompression = \byesorno{}]
281 \index[fd]{CommCompression}
282 \index[fd]{Directive!CommCompression}
283 \index[fd]{Compression}
284
285 If the two \bacula{} components (DIR, FD, SD, bconsole) have the comm line
286 compression enabled, the line compression will be enabled. The default value
287 is yes.
288
289 In many cases, the volume of data transmitted across the communications line
290 can be reduced by a factor of three when this directive is
291 \bdefaultvalue{enabled}. In the case that the compression is not effective,
292 \bacula{} turns it off on a record by record basis. \smallskip
293
294 If you are backing up data that is already compressed the comm line compression
295 will not be effective, and you are likely to end up with an average compression
296 ratio that is very small. In this case, \bacula{} reports \bvalue{None} in the
297 Job report.
298
299 \bwebdoc{FileDaemon:FileDaemon:DisableCommand}
300 \item [DisableCommand = \bbracket{cmd}]
301 The \bdirectivename{Disable Command} adds security to your File daemon by
302 disabling certain commands globally. The commands that can be
303 disabled are:
304
305 \begin{bVerbatim}
306 backup
307 cancel
308 setdebug=
309 setbandwidth=
310 estimate
311 fileset
312 JobId=
313 level =
314 restore
315 endrestore
316 session
317 status
318 .status
319 storage
320 verify
321 RunBeforeNow
322 RunBeforeJob
323 RunAfterJob
324 Run
325 accurate
326 \end{bVerbatim}
327
328 One or more of these command keywords can be placed in quotes and separated
329 by spaces on the \bdirectivename{Disable Command} directive line. Note: the commands must
330 be written exactly as they appear above.
331
332 \bwebdoc{FileDaemon:FileDaemon:SDPacketCheck}
333 \item[SD Packet Check = \bbracket{num-packets}]
334 \index[dir]{SDPacketCheck}
335 \index[dir]{Directive!SDPacketCheck}
336
337 The \bdirectivename{SDPacketCheck} takes a positive integer. The integer if
338 zero turns off the feature. If the integer is greater than zero, it is the
339 number of packets that the FileDaemon will send to the Storage Daemon before to
340 send a POLL request and wait for the Storage Daemon answer. The default value
341 is 0. If the time between two POLL requests is too short (less than few
342 seconds) and the number of bytes transfered is less than few hundred of MB, the
343 value of the \bdirectivename{SDPacketCheck} is increased dynamically.
344
345 \input{FileDaemonFileDaemonTls}
346
347 \bwebdoc{FileDaemon:FileDaemon:PkiCipher}
348 \item[PKI Cipher]
349
350 This directive is optional and if specified will configure the data
351 encryption to use a specific cipher. The default cipher is \bdefaultvalue{AES 128 CBC}.
352
353 \smallskip{}
354
355 The following ciphers are available: aes128, aes192, aes256 and blowfish
356
357 \bwebdoc{FileDaemon:FileDaemon:PkiDigest}
358 \item[PKI Digest]
359
360 This directive is optional and if specified will configure the data
361 encryption to use a specific digest algorithm. The default cipher is \bdefaultvalue{SHA1} or
362 \bdefaultvalue{SHA256} depending on the version of OpenSSL.
363
364 \smallskip{}
365
366 The following digest are available: md5, sha1, sha256.
367
368 \item [PKI Encryption]
369 See the \bilink{Data Encryption}{blb:DataEncryption} chapter of this manual.
370
371 \item [PKI Signatures]
372 See the \bilink{Data Encryption}{blb:DataEncryption} chapter of this manual.
373
374 \item [PKI Keypair]
375 See the \bilink{Data Encryption}{blb:DataEncryption} chapter of this manual.
376
377 \item [PKI Master Key]
378 See the \bilink{Data Encryption}{blb:DataEncryption} chapter of this manual.
379
380 \end{bdescription}
381
382 The following is an example of a valid Client resource definition:
383
384 \begin{bVerbatim}
385 Client { # this is me
386 Name = rufus-fd
387 WorkingDirectory = $HOME/bacula/bin/working
388 Pid Directory = $HOME/bacula/bin/working
389 }
390 \end{bVerbatim}
391
392 \section{The Director Resource}
393 \label{blb:DirectorResource4}
394 \index[general]{Director Resource }
395 \index[general]{Resource!Director }
396
397 The Director resource defines the name and password of the Directors that are
398 permitted to contact this Client.
399
400 \begin{bdescription}
401
402 \item [Director]
403 \index[fd]{Director}
404 \index[fd]{Directive!Director}
405 Start of the Director records. There may be any number of Director resources
406 in the Client configuration file. Each one specifies a Director that is
407 allowed to connect to this Client.
408
409 \bwebdoc{FileDaemon:Director:Name}
410 \item [Name = \bbracket{name}]
411 \index[fd]{Name}
412 \index[fd]{Directive!Name}
413 The name of the Director that may contact this Client. This name must be the
414 same as the name specified on the Director resource in the Director's
415 configuration file. Note, the case (upper/lower) of the characters in
416 the name are significant (i.e. S is not the same as s). This directive
417 is required.
418
419 \bwebdoc{FileDaemon:Director:Password}
420 \item [Password = \bbracket{password}]
421 \index[fd]{Password}
422 \index[fd]{Directive!Password}
423 Specifies the password that must be supplied for a Director to be authorized.
424 This password must be the same as the password specified in the Client
425 resource in the Director's configuration file. This directive is required.
426
427 \bwebdoc{FileDaemon:Director:DirPort}
428 \item [DirPort = \bbracket{number}]
429 \index[fd]{DirPort}
430 \index[fd]{Directive!DirPort}
431
432 Specify the port to use to connect to the Director. This port must be
433 identical to the \bdirectivename{DIRport} specified in the \bdirectivename{Director}
434 resource of the \bilink{Director's configuration}{blb:DirectorChapter} file.
435 The default is \bdefaultvalue{9101} so this directive is not normally specified.
436
437 \bwebdoc{FileDaemon:Director:Address}
438 \item [Address = \bbracket{address}]
439 \index[fd]{Directive!Address}
440
441 Where the address is a host name, a fully qualified domain name, or a network
442 address used to connect to the Director. This directive is required when
443 \bdirectivename{ConnectToDirector} is enabled.
444
445 \bwebdoc{FileDaemon:Director:ConnectToDirector}
446 \item [ConnectToDirector = \byesorno{}]
447 \index[fd]{Directive!ConnectToDirector}
448 \label{blb:ConnectToDirector}
449
450 When the \bdirectivename{ConnectToDirector} directive is set to \texttt{true},
451 the Client will contact the Director according to the \bresourcename{Schedule}
452 rules. The connection initiated by the Client will be then used by the Director
453 to start jobs or issue bconsole commands. If the \bdirectivename{Schedule}
454 directive is not set, the connection will be initiated when the file daemon
455 starts. The connection will be reinitialized every
456 \bdirectivename{ReconnectionTime}. This directive can be useful if your File
457 Daemon is behind a firewall that permits outgoing connections but not incoming
458 connections.
459
460 \bwebdoc{FileDaemon:Director:ReconnectionTime}
461 \item [ReconnectionTime = \bbracket{time}]
462 \index[fd]{Directive!ReconnectionTime}
463
464 When the Director resource of the FileDaemon is configured to connect the
465 Director with the \bdirectivename{ConnectToDirector} directive, the
466 connection initiated by the FileDeamon to the Director will be reinitialized
467 at a regular interval specified by the \bdirectivename{ReconnectionTime}
468 directive. The default value is \bdefaultvalue{40 mins}.
469
470 \bwebdoc{FileDaemon:Director:Schedule}
471 \item [Schedule = \bbracket{sched-resource}]
472 \index[fd]{Directive!Schedule}
473
474 The \bdirectivename{Schedule} directive defines what schedule is to be used
475 for Client to connect the Director if the directive
476 \bdirectivename{ConnectToDirector} is set to \texttt{true}.
477
478 This directive is optional, and if left out, the Client will initiate a
479 connection automatically at the start of the daemon. Although you may specify
480 only a single Schedule resource for any \bresourcename{Director} resource,
481 the \bresourcename{Schedule} resource may contain multiple
482 \bdirectivename{Connect} directives, which allow you to initiate the Client
483 connection at many different times, and each \bdirectivename{Connect} directive
484 permits to set the the \bdirectivename{Max Connect Time} directive.
485
486 \bwebdoc{FileDaemon:Director:MaximumBandwidthPerJob}
487 \item [Maximum Bandwidth Per Job = \bbracket{speed}]
488 \index[fd]{Maximum Bandwidth Per Job}
489 \index[fd]{Directive!Maximum Bandwidth Per Job}
490
491 The speed parameter specifies the maximum allowed bandwidth in bytes per
492 second that a job may use when started from this Director.
493 You may specify the following speed parameter modifiers:
494 kb/s (1,000 bytes per second), k/s (1,024 bytes per second),
495 mb/s (1,000,000 bytes per second), or m/s (1,048,576 bytes per second).
496
497 \bwebdoc{FileDaemon:Director:DisableCommand}
498 \item [DisableCommand = \bbracket{cmd}]
499 The \bdirectivename{Disable Command} adds security to your File daemon by
500 disabling certain commands for the current Director. More information
501 about the syntax can be found on \vref{FileDaemon:FileDaemon:DisableCommand}.
502
503 \bwebdoc{FileDaemon:Director:Monitor}
504 \item [Monitor = \byesorno{}]
505 \index[fd]{Monitor}
506 \index[fd]{Directive!Monitor}
507 If Monitor is set to \bdefaultvalue{no} (default), this director will have full access
508 to this Client. If Monitor is set to \bvalue{yes}, this director will only be
509 able to fetch the current status of this Client.
510
511 Please note that if this director is being used by a Monitor, we highly
512 recommend to set this directive to \bvalue{yes} to avoid serious security
513 problems.
514
515 \bwebdoc{FileDaemon:Director:AllowedBackupDirectories}
516 \item [Allowed Backup Directories = \bbracket{Directories list}]
517 \index[fd]{Allowed Backup Directories}
518 \index[fd]{Directive!Allowed Backup Directories}
519 Defines per-director list of client's directories that are allowed to be
520 backed up for specific Director.
521 This directive is fully independent of the include/exclude part of the Fileset
522 defined in the Director's config file. Nothing is backed up if none of the files defined in
523 the Fileset is inside FD's allowed directory.
524 This directive is not required. If it is not defined, every directory defined in the Fileset is allowed.
525
526 \bwebdoc{FileDaemon:Director:ExcludedBackupDirectories}
527 \item [Excluded Backup Directories = \bbracket{Directories list}]
528 \index[fd]{Excluded Backup Directories}
529 \index[fd]{Directive!Excluded Backup Directories}
530 Defines per-director list of client's directories that are exluded from the backup
531 for specific Director.
532 This directive is fully independent of the include/exclude part of the Fileset
533 defined in the Director's config file. Nothing is backed up if all files defined in
534 the Fileset are inside FD's excluded directory.
535
536 \bwebdoc{FileDaemon:Director:AllowedRestoreDirectories}
537 \item [Allowed Restore Directories = \bbracket{Directories list}]
538 \index[fd]{Allowed Restore Directories}
539 \index[fd]{Directive!Allowed Restore Directories}
540 Defines per-director list of client's directories that are allowed to be used
541 as a restore destination on a per-director basis.
542 Directive can be specified as a list of directories.
543
544 \bwebdoc{FileDaemon:Director:AllowedScriptDirectories}
545 \item [Allowed Script Directories = \bbracket{Directories list}]
546 \index[fd]{Allowed Script Directories}
547 \index[fd]{Directive!Allowed Script Directories}
548 Defines per-director list of client's directories which from the Director can execute
549 client's scripts and programs (e.g. using the Runscript feature or with the Fileset's 'File=' directive).
550 Directive can be specified as a list of directories.
551 When this directive is set, Bacula is also checking programs to be run against set of not-allowed characters.
552 Full list of not-allowed characters:
553 \begin{bVerbatim}
554 $ ! ; \ & < > ` ( )
555 \end{bVerbatim}
556
557 This directive can be used to disallow all runscript for a Director, ex: \texttt{AllowedScriptDirectories = none}
558 or \texttt{AllowedScriptDirectories = /dev/null}
559
560 \input{FileDaemonDirectorTls}
561
562 \end{bdescription}
563
564 Thus multiple Directors may be authorized to use this Client's services. Each
565 Director will have a different name, and normally a different password as
566 well.
567
568 The following is an example of a valid Director resource definition:
569
570 \begin{bVerbatim}
571 #
572 # List Directors who are permitted to contact the File daemon
573 #
574 Director {
575 Name = HeadMan
576 Password = very_good # password HeadMan must supply
577 }
578 Director {
579 Name = Worker
580 Password = not_as_good
581 Monitor = Yes
582 }
583 \end{bVerbatim}
584
585
586 \label{blb:FDScheduleResource}
587 \section{The Schedule Resource}
588 \index[general]{Resource!Schedule}
589 \index[general]{Schedule Resource}
590
591 The Schedule resource provides a means of automatically scheduling the
592 connection of the Client to the Director. Each Director resource can have
593 a different Schedule resource.
594
595 \begin{bdescription}
596
597 \item [Schedule]
598 \index[fd]{Schedule}
599 \index[fd]{Directive!Schedule}
600 Start of the Schedule directives. No \bresourcename{Schedule} resource is
601 required. If no \bresourcename{Schedule} is used, the Client will connect
602 automatically to the Director at the startup.
603
604 \bwebdoc{FileDaemon:Schedule:Name}
605 \item [Name = \bbracket{name}]
606 \index[fd]{Name}
607 \index[fd]{Directive!Name}
608 The name of the schedule being defined. The Name directive is required.
609
610 \bwebdoc{FileDaemon:Schedule:Enabled}
611 \item [Enabled = \byesorno{}]
612 \index[fd]{Enabled}
613 \index[fd]{Directive!Enabled}
614 This directive allows you to enable or disable the \bresourcename{Schedule} resource.
615
616 \bwebdoc{FileDaemon:Schedule:Connect}
617 \item [Connect = \bbracket{Connect-overrides} \bbracket{Date-time-specification}]
618 \index[fd]{Connect}
619 \index[fd]{Directive!Connect}
620
621 The Connect directive defines when a Client should connect to a Director.
622 You may specify multiple \bdirectivename{Connect} directives within a
623 \bresourcename{Schedule} resource. If you do, they will all be applied
624 (i.e. multiple schedules). If you have two \bdirectivename{Connect}
625 directives that start at the same time, two connections will start at the
626 same time (well, within one second of each other). It is not recommended to
627 have multiple connections at the same time.
628
629 \textbf{Connect-options} are specified as: \textbf{keyword=value} where the
630 keyword is \bkeyword{MaxConnectTime} and the \bvalue{value} is as defined on the respective
631 directive formats for the Job resource. You may specify multiple \textbf{Connect-options}
632 on one \bdirectivename{Connect} directive by separating them with one or
633 more spaces or by separating them with a trailing comma. For example:
634
635 \begin{bdescription}
636
637 \item [MaxConnectTime=\bbracket{time-spec}]
638 \index[fd]{MaxConnectTime}
639 \index[fd]{Directive!MaxConnectTime}
640 specifies how much time the connection will be attempt and active.
641
642 \end{bdescription}
643 \end{bdescription}
644
645 \bwebdoc{Director:Schedule:End}
646
647 The \bbracket{Date-time-specification} is similar to what exists for Job scheduling.
648 See \vref{Date-time-specification} for more information.
649
650 \smallskip
651
652 An example schedule resource that is named \bvalue{WeeklyCycle} and connects a
653 director each Sunday at 2:05am and an on Monday through Saturday at 2:05am is:
654
655 \begin{bVerbatim}
656 Schedule {
657 Name = "WeeklyCycle"
658 Connect = MaxConnectTime=2h sun at 2:05
659 Connect = MaxConnectTime=2h mon-sat at 2:05
660 }
661 \end{bVerbatim}
662
663 In this example, the Job for this client should be schedule to start between
664 2:05 and 4:05 during the week. The \bacula{} administrator will be able to use
665 commands such as \bcommandname{status client} or \bcommandname{estimate} betwen
666 2:05 and 4:05.
667
668 \section{The Message Resource}
669 \label{blb:MessagesResource3}
670 \index[general]{Message Resource}
671 \index[general]{Resource!Message }
672
673 Please see the
674 \bilink{Messages Resource}{blb:MessagesChapter} Chapter of this
675 manual for the details of the Messages Resource.
676
677 There must be at least one Message resource in the Client configuration file.
678
679 \bwebdoc{FDStatisticsResource}
680 \section{The Statistics Resource}
681 \index[general]{Resource!Statistics}
682 \index[general]{Statistics Resource}
683
684 The \bresourcename{Statistics} Resource defines the statistic collector function that can send
685 information to a Graphite instance, to a \acs{CSV} file or to \bconsolename{} with the
686 \bcommandname{statistics} command (See \vref{blb:StatisticsCommand} for more information).
687
688
689 \begin{bdescription}
690
691 \item [Statistics]
692 \index[dir]{Statistics}
693 \index[dir]{Directive!Statistics}
694 Start of the \bresourcename{Statistics} resource. Statistics directives are optional.
695
696 \bwebdoc{FileDaemon:Statistics:Name}
697 \item [Name = \bbracket{name}]
698 \index[dir]{Name}
699 \index[dir]{Directive!Name}
700
701 The Statistics directive \bdirectivename{name} is used by the system administrator. This
702 directive is required.
703
704 \bwebdoc{FileDaemon:Statistics:Description}
705 \item [Description = \bbracket{string}]
706 \index[dir]{bdescription}
707 \index[dir]{Directive!Description}
708
709 The text field contains a description of the \bresourcename{Statistics} resource that will
710 be displayed in the graphical user interface. This directive is optional.
711
712 \bwebdoc{FileDaemon:Statistics:Interval}
713 \item [Interval = \bbracket{time-interval}]
714 \index[dir]{Interval}
715 \index[dir]{Directive!Interval}
716 \index[dir]{Directive!Interval}
717
718 The \bdirectivename{Intervall} directive instructs the Statistics collector thread how long
719 it should sleep between every collection iteration. This directive is
720 optional and the default value is \bdefaultvalue{300} seconds.
721
722 \bwebdoc{FileDaemon:Statistics:Type}
723 \item [Type = \bbracket{CSV|Graphite}]
724 \index[dir]{Type}
725 \index[dir]{Directive!Type}
726
727 The \bdirectivename{Type} directive specifies the Statistics backend, which may be one of the
728 following: \bvalue{\acs{CSV}} or \bvalue{Graphite}. This directive is required.
729 \smallskip
730
731 \acs{CSV} is a simple file level backend which saves all required metrics with the
732 following format to the file: ``\bbracket{time}, \bbracket{metric}, \bbracket{value}\textbackslash{}n''
733
734 Where \bbracket{time} is a standard Unix time (a number of seconds from 1/01/1970)
735 with local timezone as returned by a system call \btool{time()}, \bbracket{metric} is a
736 \bacula{} metric string and \bbracket{value} is a metric value which could be in numeric
737 format (\texttt{int}/\texttt{float}) or a string \bvalue{"True"} or \bvalue{"False"} for boolean variable. The
738 \acs{CSV} backend requires the \bvalueddirective{File}{~} parameter.
739 \smallskip
740
741 Graphite is a network backend which will send all required metrics to a Graphite
742 server. The Graphite backend requires the \bvalueddirective{Host}{~} and \bvalueddirective{Port}{~} directives to be set.
743
744 If the Graphite server is not available, the metrics are automatically
745 spooled in the working directory. When the server can be reached again,
746 spooled metrics are despooled automatically and the spooling function is
747 suspended.
748
749
750 \bwebdoc{FileDaemon:Statistics:Metrics}
751 \item [Metrics = \bbracket{metricspec}]
752 \index[dir]{Metrics}
753 \index[dir]{Directive!Metrics}
754
755 The \bdirectivename{Metrics} directive allow metric filtering and \bbracket{metricspec} is a filter which
756 enables to use \bvalue{*} and \bvalue{?} characters to match the required metric name in the
757 same way as found in shell wildcard resolution. You can exclude filtered
758 metric with \bvalue{!} prefix. You can define any number of filters for a single
759 Statistics. Metrics filter is executed in order as found in
760 configuration. This directive is optional and if not used all available
761 metrics will be saved by this collector backend.
762 \smallskip
763
764 Example:
765 \begin{bVerbatim}
766 # Include all metric starting with "bacula.jobs"
767 Metrics = "bacula.jobs.*"
768
769 # Exclude any metric starting with "bacula.jobs"
770 Metrics = "!bacula.jobs.*"
771 \end{bVerbatim}
772
773 \bwebdoc{FileDaemon:Statistics:Prefix}
774 \item [Prefix = \bbracket{string}]
775 \index[dir]{Prefix}
776 \index[dir]{Directive!Prefix}
777
778 The \bdirectivename{Prefix} allows to alter the metrics name saved by collector to
779 distinguish between different installations or daemons. The prefix string
780 will be added to metric name as: ``\bbracket{prefix}.\bbracket{metric\_name}'' This directive is
781 optional.
782
783 \bwebdoc{FileDaemon:Statistics:Prefix}
784 \item [File = \bbracket{filename}]
785 \index[dir]{File}
786 \index[dir]{Directive!File}
787
788 The \bdirectivename{File} is used by the \acs{CSV} collector backend and point to the full
789 path and filename of the file where metrics will be saved. With the \acs{CSV}
790 type, the \bdirectivename{File} directive is required. The collector thread must have the
791 permissions to write to the selected file or create a new file if the file
792 doesn't exist. If collector is unable to write to the file or create a new
793 one then the collection terminates and an error message will be
794 generated. The file is only open during the dump and is closed
795 otherwise. Statistics file rotation could be executed by a mv shell command.
796
797 \bwebdoc{FileDaemon:Statistics:Host}
798 \item [Host = \bbracket{hostname}]
799 \index[dir]{Host}
800 \index[dir]{Directive!Host}
801
802 The \bdirectivename{Host} directive is used for Graphite backend and specify the
803 hostname or the \acs{IP} address of the Graphite server. When the directive Type
804 is set to Graphite, the \bdirectivename{Host} directive is required.
805
806 \bwebdoc{FileDaemon:Statistics:Port}
807 \item [Host = \bbracket{number}]
808 \index[dir]{Port}
809 \index[dir]{Directive!Port}
810
811 The \bdirectivename{Port} directive is used for Graphite backend and specify the \acs{TCP} port
812 number of the Graphite server. When the directive Type
813 is set to Graphite, the \bdirectivename{Port} directive is required.
814
815
816 \bwebdoc{FileDaemon:Statistics:End}
817 \end{bdescription}
818
819
820 \section{Example Client Configuration File}
821 \label{blb:SampleClientConfiguration}
822 \index[general]{Example Client Configuration File }
823 \index[general]{File!Example Client Configuration }
824
825 An example File Daemon configuration file might be the following:
826
827 \begin{bVerbatim}
828 #
829 # Default Bacula File Daemon Configuration file
830 #
831 # For Bacula release 1.35.2 (16 August 2004) -- gentoo 1.4.16
832 #
833 # There is not much to change here except perhaps to
834 # set the Director's name and File daemon's name
835 # to something more appropriate for your site.
836 #
837 #
838 # List Directors who are permitted to contact this File daemon
839 #
840 Director {
841 Name = rufus-dir
842 Password = "/LqPRkX++saVyQE7w7mmiFg/qxYc1kufww6FEyY/47jU"
843 }
844 #
845 # Restricted Director, used by tray-monitor to get the
846 # status of the file daemon
847 #
848 Director {
849 Name = rufus-mon
850 Password = "FYpq4yyI1y562EMS35bA0J0QC0M2L3t5cZObxT3XQxgxppTn"
851 Monitor = yes
852 }
853 #
854 # "Global" File daemon configuration specifications
855 #
856 FileDaemon { # this is me
857 Name = rufus-fd
858 WorkingDirectory = $HOME/bacula/bin/working
859 Pid Directory = $HOME/bacula/bin/working
860 }
861 # Send all messages except skipped files back to Director
862 Messages {
863 Name = Standard
864 director = rufus-dir = all, !skipped
865 }
866 \end{bVerbatim}