]> git.sur5r.net Git - bacula/docs/blob - docs/manual/filedconf.tex
kes Make sure valid argument passed to str_to_utime() where Arno
[bacula/docs] / docs / manual / filedconf.tex
1 %%
2 %%
3
4 \section*{Client/File daemon Configuration}
5 \label{_ChapterStart25}
6 \index[general]{Configuration!Client/File daemon }
7 \index[general]{Client/File daemon Configuration }
8 \addcontentsline{toc}{section}{Client/File daemon Configuration}
9
10 \subsection*{General}
11 \index[general]{General }
12 \addcontentsline{toc}{subsection}{General}
13
14 The Client (or File Daemon) Configuration is one of the simpler ones to
15 specify. Generally, other than changing the Client name so that error messages
16 are easily identified, you will not need to modify the default Client
17 configuration file. 
18
19 For a general discussion of configuration file and resources including the
20 data types recognized by {\bf Bacula}, please see the 
21 \ilink{Configuration}{_ChapterStart16} chapter of this manual. The
22 following Client Resource definitions must be defined: 
23
24 \begin{itemize}
25 \item 
26    \ilink{Client}{ClientResource} -- to define what Clients are  to
27    be backed up.  
28 \item 
29    \ilink{Director}{DirectorResource} -- to  define the Director's
30    name and its access password.  
31 \item 
32    \ilink{Messages}{_ChapterStart15} -- to define where error  and
33    information messages are to be sent. 
34 \end{itemize}
35
36 \subsection*{The Client Resource}
37 \label{ClientResource}
38 \index[general]{Resource!Client }
39 \index[general]{Client Resource }
40 \addcontentsline{toc}{subsection}{Client Resource}
41
42 The Client Resource (or FileDaemon) resource defines the name of the Client
43 (as used by the Director) as well as the port on which the Client listens for
44 Director connections. 
45
46 \begin{description}
47
48 \item [Client (or FileDaemon)]
49    \index[fd]{Client (or FileDaemon)}
50    \index[fd]{Directive!Client (or FileDaemon)}
51    Start of the Client records.  There must be one and only one Client resource
52 in the  configuration file, since it defines the properties of the  current
53 client program. 
54
55 \item [Name = \lt{}name\gt{}]
56    \index[fd]{Name}
57    \index[fd]{Directive!Name}
58    The client name that must be used  by the Director when connecting. Generally,
59    it is a good idea  to use a name related to the machine so that error messages
60    can be easily identified if you have multiple Clients.  This directive is
61    required.  
62
63 \item [Working Directory = \lt{}Directory\gt{}]
64    \index[fd]{Working Directory}
65    \index[fd]{Directive!Working Directory}
66    This directive  is mandatory and specifies a directory in which the File
67    daemon  may put its status files. This directory should be used only  by {\bf
68    Bacula}, but may be shared by other Bacula daemons provided the daemon
69    names on the {\bf Name} definition are unique for each daemon. This directive
70    is required. 
71
72    On Win32 systems, in some circumstances you may need to specify a drive
73    letter in the specified working directory path.  Also, please be sure
74    that this directory is writable by the SYSTEM user otherwise restores
75    may fail (the bootstrap file that is transferred to the File daemon from
76    the Director is temporarily put in this directory before being passed
77    to the Storage daemon).
78
79 \item [Pid Directory = \lt{}Directory\gt{}]
80    \index[fd]{Pid Directory}
81    \index[fd]{Directive!Pid Directory}
82    This directive  is mandatory and specifies a directory in which the Director 
83    may put its process Id file files. The process Id file is used to  shutdown
84    Bacula and to prevent multiple copies of  Bacula from running simultaneously. 
85    This record is required. Standard shell expansion of the {\bf Directory}  is
86    done when the configuration file is read so that values such  as {\bf \$HOME}
87    will be properly expanded.  
88
89    Typically on Linux systems, you will set this to:  {\bf /var/run}. If you are
90    not installing Bacula in the  system directories, you can use the {\bf Working
91    Directory} as  defined above. 
92
93 \item [Heartbeat Interval = \lt{}time-interval\gt{}]
94    \index[fd]{Heartbeat Interval}
95    \index[fd]{Directive!Heartbeat Interval}
96    \index[general]{Heartbeat Interval}
97    \index[general]{Broken pipe}
98    \index[general]{slow}
99    \index[general]{Backups!slow}
100    This record defines an interval of time.  For each heartbeat that the
101    File daemon receives from the Storage daemon, it will forward it to the
102    Director.  In addition, if no heartbeat has been received from the
103    Storage daemon and thus forwarded the File daemon will send a heartbeat
104    signal to the Director and to the Storage daemon to keep the channels
105    active.  The default interval is zero which disables the heartbeat.
106    This feature is particularly useful if you have a router such as 3Com
107    that does not follow Internet standards and times out a valid    
108    connection after a short duration despite the fact that keepalive is
109    set. This usually results in a broken pipe error message.
110
111    If you continue getting broken pipe error messages despite using the
112    Heartbeat Interval, and you are using Windows, you should consider
113    upgrading your ethernet driver.  This is a known problem with NVidia
114    NForce 3 drivers (4.4.2 17/05/2004), or try the following workaround
115    suggested by Thomas Simmons for Win32 machines:
116
117    Browse to:
118    Start \gt{} Control Panel \gt{} Network Connections
119
120    Right click the connection for the nvidia adapter and select properties. 
121    Under the General tab, click "Configure...". Under the Advanced tab set 
122    "Checksum Offload" to disabled and click OK to save the change.  
123    
124    Lack of communications, or communications that get interrupted can
125    also be caused by Linux firewalls where you have a rule that throttles
126    connections or traffic.
127
128
129 \item [Maximum Concurrent Jobs = \lt{}number\gt{}]
130    \index[fd]{Maximum Concurrent Jobs}
131    \index[fd]{Directive!Maximum Concurrent Jobs}
132    where \lt{}number\gt{} is the maximum number of Jobs that should run
133    concurrently.  The default is set to 2, but you may set it to a larger
134    number.  Each contact from the Director (e.g.  status request, job start
135    request) is considered as a Job, so if you want to be able to do a {\bf
136    status} request in the console at the same time as a Job is running, you
137    will need to set this value greater than 1.
138
139 \item [FDAddresses = \lt{}IP-address-specification\gt{}]
140    \index[fd]{FDAddresses}
141    \index[fd]{Directive!FDAddresses}
142    Specify the ports and addresses on which the File daemon listens for
143    Director connections.  Probably the simplest way to explain is to show
144    an example:
145
146 \footnotesize
147 \begin{verbatim}
148  FDAddresses  = { 
149     ip = { addr = 1.2.3.4; port = 1205; }
150     ipv4 = {
151         addr = 1.2.3.4; port = http; }
152     ipv6 = {
153         addr = 1.2.3.4;
154         port = 1205;
155     }
156     ip = {
157         addr = 1.2.3.4
158         port = 1205
159     }
160     ip = { addr = 1.2.3.4 }
161     ip = {
162         addr = 201:220:222::2
163     }
164     ip = {
165         addr = bluedot.thun.net
166     }
167  }
168 \end{verbatim}
169 \normalsize
170
171 where ip, ip4, ip6, addr, and port are all keywords. Note, that  the address
172 can be specified as either a dotted quadruple, or  IPv6 colon notation, or as
173 a symbolic name (only in the ip specification).  Also, port can be specified
174 as a number or as the mnemonic value from  the /etc/services file.  If a port
175 is not specified, the default will be used. If an ip  section is specified,
176 the resolution can be made either by IPv4 or  IPv6. If ip4 is specified, then
177 only IPv4 resolutions will be permitted,  and likewise with ip6.  
178
179 \item [FDPort = \lt{}port-number\gt{}]
180    \index[fd]{FDPort}
181    \index[fd]{Directive!FDPort}
182    This specifies the port number  on which the Client listens for Director
183 connections. It must agree  with the FDPort specified in the Client resource
184 of the Director's  configuration file. The default is 9102. 
185
186 \item [FDAddress = \lt{}IP-Address\gt{}]
187    \index[fd]{FDAddress}
188    \index[fd]{Directive!FDAddress}
189    This record is optional,  and if it is specified, it will cause the File
190 daemon server (for  Director connections) to bind to the specified {\bf
191 IP-Address},  which is either a domain name or an IP address specified as a 
192 dotted quadruple. If this record is not specified, the File daemon  will bind
193 to any available address (the default). 
194
195 \item [SDConnectTimeout = \lt{}time-interval\gt{}]
196    \index[fd]{SDConnectTimeout}
197    \index[fd]{Directive!SDConnectTimeout}
198    This  record defines an interval of time that  the File daemon will try to
199 connect to the  Storage daemon. The default is 30 minutes. If no connection 
200 is made in the specified time interval, the File daemon  cancels the Job. 
201
202 \item [Maximum Network Buffer Size = \lt{}bytes\gt{}]  
203    \index[fd]{Maximum Network Buffer Size}
204    \index[fd]{Directive!Maximum Network Buffer Size}
205    where \lt{}bytes\gt{} specifies the initial network buffer  size to use with
206 the File daemon. This size will be adjusted down  if it is too large until it
207 is accepted by the OS. Please use  care in setting this value since if it is
208 too large, it will  be trimmed by 512 bytes until the OS is happy, which may
209 require  a large number of system calls. The default value is 32,768 bytes. 
210 \end{description}
211
212 The following is an example of a valid Client resource definition: 
213
214 \footnotesize
215 \begin{verbatim}
216 Client {                              # this is me
217   Name = rufus-fd
218   WorkingDirectory = $HOME/bacula/bin/working
219   Pid Directory = $HOME/bacula/bin/working
220 }
221 \end{verbatim}
222 \normalsize
223
224 \subsection*{The Director Resource}
225 \label{DirectorResource}
226 \index[general]{Director Resource }
227 \index[general]{Resource!Director }
228 \addcontentsline{toc}{subsection}{Director Resource}
229
230 The Director resource defines the name and password of the Directors that are
231 permitted to contact this Client. 
232
233 \begin{description}
234
235 \item [Director]
236    \index[fd]{Director}
237    \index[fd]{Directive!Director}
238    Start of the Director records. There may be any  number of Director resources
239 in the Client configuration file. Each  one specifies a Director that is
240 allowed to connect to this  Client. 
241
242 \item [Name = \lt{}name\gt{}]
243    \index[fd]{Name}
244    \index[fd]{Directive!Name}
245    The name of the Director  that may contact this Client. This name must be the 
246 same as the name specified on the Director resource  in the Director's
247 configuration file. This record is required. 
248
249 \item [Password = \lt{}password\gt{}]
250    \index[fd]{Password}
251    \index[fd]{Directive!Password}
252    Specifies the password that must be  supplied for a Director to be authorized.
253 This password  must be the same as the password specified in the  Client
254 resource in the Director's configuration file.  This record is required. 
255
256 \item [Monitor = \lt{}yes|no\gt{}]
257    \index[fd]{Monitor}
258    \index[fd]{Directive!Monitor}
259    If Monitor is set to {\bf no} (default),  this director will have full access
260 to this Client. If Monitor is set to  {\bf yes}, this director will only be
261 able to fetch the current status  of this Client.
262
263 Please note that if this director is being used by a Monitor, we highly 
264 recommend to set this directive to {\bf yes} to avoid serious security 
265 problems. 
266 \end{description}
267
268 Thus multiple Directors may be authorized to use this Client's services. Each
269 Director will have a different name, and normally a different password as
270 well. 
271
272 The following is an example of a valid Director resource definition: 
273
274 \footnotesize
275 \begin{verbatim}
276 #
277 # List Directors who are permitted to contact the File daemon
278 #
279 Director {
280   Name = HeadMan
281   Password = very_good                # password HeadMan must supply
282 }
283 Director {
284   Name = Worker
285   Password = not_as_good
286   Monitor = Yes
287 }
288 \end{verbatim}
289 \normalsize
290
291 \subsection*{The Message Resource}
292 \label{MessagesResource}
293 \index[general]{Message Resource }
294 \index[general]{Resource!Message }
295 \addcontentsline{toc}{subsection}{Message Resource}
296
297 Please see the 
298 \ilink{Messages Resource}{_ChapterStart15} Chapter of this
299 manual for the details of the Messages Resource. 
300
301 There must be at least one Message resource in the Client configuration file. 
302
303 \subsection*{Example Client Configuration File}
304 \label{SampleClientConfiguration}
305 \index[general]{Example Client Configuration File }
306 \index[general]{File!Example Client Configuration }
307 \addcontentsline{toc}{subsection}{Example Client Configuration File}
308
309 An example File Daemon configuration file might be the following: 
310
311 \footnotesize
312 \begin{verbatim}
313 #
314 # Default  Bacula File Daemon Configuration file
315 #
316 #  For Bacula release 1.35.2 (16 August 2004) -- gentoo 1.4.16
317 #
318 # There is not much to change here except perhaps to
319 #   set the Director's name and File daemon's name
320 #   to something more appropriate for your site.
321 #
322 #
323 # List Directors who are permitted to contact this File daemon
324 #
325 Director {
326   Name = rufus-dir
327   Password = "/LqPRkX++saVyQE7w7mmiFg/qxYc1kufww6FEyY/47jU"
328 }
329 #
330 # Restricted Director, used by tray-monitor to get the
331 #   status of the file daemon
332 #
333 Director {
334   Name = rufus-mon
335   Password = "FYpq4yyI1y562EMS35bA0J0QC0M2L3t5cZObxT3XQxgxppTn"
336   Monitor = yes
337 }
338 #
339 # "Global" File daemon configuration specifications
340 #
341 FileDaemon {                          # this is me
342   Name = rufus-fd
343   WorkingDirectory = $HOME/bacula/bin/working
344   Pid Directory = $HOME/bacula/bin/working
345 }
346 # Send all messages except skipped files back to Director
347 Messages {
348   Name = Standard
349   director = rufus-dir = all, !skipped
350 }
351 \end{verbatim}
352 \normalsize