User Tools

Site Tools


Action disabled: register
bacula_manual:resource_directive_format

Resource Directive Format

Although you won't need to know the details of all the directives, at least not to start, a basic understanding of Bacula resource directives is essential. Each directive contained within the resource (that is, 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 directive, and may optionally contain a Description directive. The Name directive is used to uniquely identify the resource. The Description directive is (will be) used during display of the Resource to provide easier human recognition. 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 this case, $HOME will be relative to the environment from which the director starts; if that's cron or an initscript, you may need to manually supply it.

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.

Comments

When 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 treated as a statement separator; anything after the semicolon is considered as a new 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 Spaces

Case (upper/lower) and spaces are totally ignored in the resource directive 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 backslash (\) is taken as itself (handy for inserting backslashes and double quotes (“)).

Please note, however, that Bacula resource names as well as certain other names (e.g. Volume names) must contain only letters (including ISO accented letters), numbers, and a few special characters (space, underscore, …). All other characters and punctuation are invalid.

bacula_manual/resource_directive_format.txt · Last modified: 2010/02/08 15:42 by baylink