![]()
Customizing the Configuration FilesWhen each of the three Bacula daemons starts, it reads a configuration file specified on the command line or the default bacula-dir.conf, bacula-fd.conf, bacula-sd.conf, or console.conf for the Director daemon, the File daemon, the Storage daemon, and the Console program respectively.Each service (Director, Client, Storage, Console) has its own configuration file containing a set of Resource Records. These resources are very similar from one service to another, but may contain different records depending on the service. For example, in the Director's resource file, the Director resource defines the name of the Director, a number of global Director parameters and his password. In the File daemon configuration file, the Director resource specifies which Directors are permitted to use the File daemon. Before running Bacula for the first time, you must customize the configuration files for each daemon. Default configuration files will have been created by the installation process, but you will need to modify them to correspond to your system.
Resource Record FormatAlthough, you won't need to know the details of all the records, a basic knowledge of Bacula resource records is essential. Each record contained within the resource (within the braces) is composed of a keyword followed by an equal sign (=) followed by one or more values. The keywords must be one of the known Bacula resource record keywords, and it may be composed of upper or lower case characters and spaces.Each resource definition MUST contain a Name record, and may optionally contain a Description record. The Name record is used to uniquely identify the resource. The Description record is (will be) used during display of the record to provide easier human recognition of the record. For example: Director { Name = "MyDir" Description = "Main Bacula Director" WorkingDirectory = "$HOME/bacula/bin/working" }Defines the Director resource with the name "MyDir" and a working directory $HOME/bacula/bin/working. In general, if you want spaces in a name to the right of the first equal sign (=), you must enclose that name within double quotes. Otherwise quotes are not generally necessary because once defined, quoted strings and unquoted strings are all equal. CommentsWhen reading the configuration file, blank lines are ignored and everything after a hash sign (#) until the end of the line is taken to be a comment. A semicolon (;) is a logical end of line, and anything after the semicolon is considered as the next statement. If a statement appears on a line by itself, a semicolon is not necessary to terminate it, so generally in the examples in this manual, you will not see many semicolons.Upper and Lower Case and SpacesCase (upper/lower) and spaces are totally ignored in the resource record keywords (the part before the equal sign).Within the keyword (i.e. before the equal sign), spaces are not significant. Thus the keywords: name, Name, and N a m e are all identical. Spaces after the equal sign and before the first character of the value are ignored. In general, spaces within a value are significant (not ignored), and if the value is a name, you must enclose the name in double quotes for the spaces to be accepted. Names may contain up to 127 characters. Currently, a name may contain any ASCII character. Within a quoted string, any character following a slash (\) is taken as itself (handy for inserting slashes and double quotes ("). Please note, however, that Bacula resource names as well as certain other names (e.g. Volume names) will in the future be severely limited to permit only letters (including ISO accented letters), numbers, and a few special characters (space, underscore, ...). All other characters and punctuation will be illegal. Recognized Primitive Data TypesWhen parsing the resource records, Bacula classifies the data according to the types listed below. The first time you read this, it may appear a bit overwhelming, but in reality, it is all pretty logical and straight forward.
If you want to input one million rather than the megabyte size (1,048,576), you can simply enter 1.0e6.
Resource TypesThe following table lists all current Bacula resource types. It shows what resources must be defined for each service (daemon). The default configuration files will already contain at least one example of each permitted resource, so you need not worry about creating all these kinds of records from scratch.
The details of each Resource and the records permitted therein are described in the following chapters. The following configuration files must be defined:
|