
#include "bacula_template.inc" title="Client/File daemon Configuration" num=5.2

<H1>Client/File daemon Configuration</H1>

<h2>General</h2>
The Client (or File Daemon) Configuration is one of the
simpler ones to specify. Generally, other than changing
the Client name so that error messages are easily identified,
you will not need to modify the default Client configuration
file.

<p>For a general discussion of configuration file and resources
including the data types recognized by <b>Bacula</b>, please
see the <a href="configure.html">Configuration</a> chapter of this
manual.


The following Client Resource definitions must be defined:
<ul> 
  <li><a href="#ClientResource">Client</a> -- to define what Clients are
      to be backed up.</li> 
  <li><a href="#DirectorResource">Director</a> -- to
      define the Director's name and its access password.</li>
  <li><a href="messagesres.html">Messages</a> -- to define where error
      and information messages are to be sent.  </li>
</ul>
        
<h1><a name="ClientResource">The Client Resource</a></h1>
The Client Resource (or FileDaemon) resource defines the name
of the Client (as used by the Director) as well as the port on
which the Client listens for Director connections.
<dl>
<dt>Client (or FileDaemon)</dt><dd>Start of the Client records.
   There must be one and only one Client resource in the
   configuration file, since it defines the properties of the
   current client program. </dd>
<dt>Name = &lt;name&gt;</dt><dd>The client name that must be used
   by the Director when connecting. Generally, it is a good idea
   to use a name related to the machine so that error messages
   can be easily identified if you have multiple Clients.      
   This record is required.</dd>
<dt>Working Directory = &lt;Directory&gt;</dt><dd>This directive
   is mandatory and specifies a directory in which the File daemon
   may put its status files. This directory should be used only
   by <b>Bacula</b>, but may be shared by other Bacula daemons. This
   record is required</dd>
<dt>Pid Directory = &lt;Directory&gt;</dt><dd>This directive
   is mandatory and specifies a directory in which the Director 
   may put its process Id file files. The process Id file is used to 
   shutdown <b>Bacula</b> and to prevent multiple copies of
   <b>Bacula</b> from running simultaneously.
   This record is required. Standard shell expansion of the <b>Directory</b>
   is done when the configuration file is read so that values such
   as <b>$HOME</b> will be properly expanded.
   <p>Typically on Linux systems, you will set this to:  
   <b>/var/run</b>. If you are not installing <b>Bacula</b> in the
   system directories, you can use the <b>Working Directory</b> as
   defined above. </dd>

<dt>SubSys Directory = &lt;Directory&gt;</dt><dd>This directive
   is mandatory and specifies a directory in which the Director 
   may put its subsystem lock files. This
   record is required. Standard shell expansion of the <b>Directory</b>
   is done when the configuration file is read so that values such
   as <b>$HOME</b> will be properly expanded.
   <p>Typically on Linux systems, you will set this to:  
   <b>/var/run/subsys</b>. If you are not installing <b>Bacula</b> in the
   system directories, you can use the <b>Working Directory</b> as
   defined above. <b>Take care that you do not set this to the
   same directory that contains your binary files or they will be
   deleted.</b></dd>

<dt>Maximum Concurrent Jobs = &lt;number&gt;</dt><dd>where &lt;number&gt;
   is the maximum number of Jobs that should run concurrently. The
   default is set to 2, but you may set it to a larger number. Each
   contact from the Director (e.g. status request, job start request) is
   considered as a Job, so if you want to be able to do a <b>status</b>
   request in the console at the same time as a Job is running, you
   will need to set this value greater than 1. </dd>
                           
<dt>FDPort = &lt;port-number&gt;</dt><dd>This specifies the port number
   on which the Client listens for Director connections. It must agree
   with the FDPort specified in the Client resource of the Director's
   configuration file. The default is 9102. </dd>

<dt>FDAddress = &lt;IP-Address&gt;</dt><dd>This record is optional,
   and if it is specified, it will cause the File daemon server (for
   Director connections) to bind to the specified <b>IP-Address</b>,
   which is either a domain name or an IP address specified as a
   dotted quadruple.  If this record is not specified, the File daemon
   will bind to any available address (the default). </dd>

</dl>

The following is an example of a valid Client resource definition:
<pre>
Client {                              # this is me
  Name = rufus-fd
  WorkingDirectory = $HOME/bacula/bin/working
  Pid Directory = $HOME/bacula/bin/working
  SubSys Directory = $HOME/bacula/bin/working
}

</pre>

<h1><a name="DirectorResource">The Director Resource</a></h1>
The Director resource defines the name and password of the 
Directors that are permitted to contact this Client.      
<dl>
<dt>Director</dt><dd>Start of the Director records. There may be any
    number of Director resources in the Client configuration file. Each
    one specifies a Director that is allowed to connect to this
    Client. </dd>
<dt>Name = &lt;name&gt;</dt><dd>The name of the Director
    that may contact this Client. This name must be the
    same as the name specified on the Director resource
    in the Director's configuration file. This record is required.</dd>
<dt>Password = &lt;password&gt;</dt><dd>Specifies the password that must be
    supplied for a Director to be authorized. This password
    must be the same as the password specified in the 
    Client resource in the Director's configuration file.
    This record is required.</dd>

</dl>
Thus multiple Directors may be authorized to use this Client's services.
Each Director will have a different name, and normally a different password
as well.
<p>
The following is an example of a valid Director resource definition:
<pre>
\#
\# List Directors who are permitted to contact the File daemon
\#
Director {
  Name = HeadMan
  Password = very_good                \# password HeadMan must supply
}

Director {
  Name = Worker
  Password = not_as_good
}
</pre>

<h1><a name="MessagesResource">The Message Resource</a></h1>
Please see the <a href="messagesres.html">Messages Resource</a>
Chapter of this manual for the details of the Messages Resource.
<p>There must be at least one Message resource in the Client
configuration file.



<h1><a name="SampleClientConfiguration">Example Client Configuration File</a></h1>
An example File Daemon configuration file might be the following:
<pre>
\#
\# Default  Bacula File Daemon Configuration file
\#
\#  For Bacula release 1.15 (5 March 2002) -- redhat 7.1
\#
\# There is not much to change here except perhaps to 
\#   set the Director's name and File daemon's name
\#   to something more appropriate for your site.
\#

\#
\# List Directors who are permitted to contact this File daemon
\#
Director {
  Name = rufus-dir
  Password = "/LqPRkX++saVyQE7w7mmiFg/qxYc1kufww6FEyY/47jU"
}

\#
\# "Global" File daemon configuration specifications
\#
FileDaemon {                          \# this is me
  Name = rufus-fd
  WorkingDirectory = $HOME/bacula/bin/working
  Pid Directory = $HOME/bacula/bin/working
  SubSys Directory = $HOME/bacula/bin/working
}

\# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = rufus-dir = all, !skipped
}
</pre>

<page_prev name="Director Configuration" url="dirdconf.html">
<page_next name="Storage Daemon Configuration" url="storedconf.html">
