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