Introduction to the Bacula Configuration Files

The first step before running the bacula for the first time is ensuring all bacula configuration files are customized for specific daemons. Default configuration files should be modified to correspond to your system.

The Bacula configuration files are written according to available resources consisting of directives which are surrounded by “{}” braces. Each bacula component comprises of a certain file in the /etc/bacula directory.

When each bacula program starts, they read bacula configuration files on the command line for the director daemon, file daemon, storage daemon and the console program.

Different Bacula components should authorize themselves to one another by using the password directive. For example, the storage resource password in the /etc/bacula/bacula-dir.conf should match the director resource password in /etc/bacula/bacula-sd/conf.

Initially, the backup job titled Backupclient1 is configured in the archive- Bacula Catalog. Using the server to backup more clients means using a more descriptive name. To change the name one should edit; /etc/bacula/bacula-dir.conf:

In essence, the console is used to query the Director regarding jobs. Using the console with a non-root user, the user should be in the bacula group.

The console, client, director and storage services have their own configuration files with resource definitions. The resources have separate records or directives depending on the service. For instance, in the director’s resource file, the director source defines the director’s name, several global director parameters and the password. The file daemon configuration file has the director resource specifying the type of directors permitted to use the file daemon.

The process of adding more hosts to the users’ current setups involves:

  • Installing the client software
  • Creating a bacula-fd.conf. file it requires
  • Updating directors configuration
  • Updating storage configuration.

Learn More

Bacula Configuration Files

  • BAT Console: The bat.conf console offers the user a local windows interface to connect to the bacula server and view the status for different jobs.
  • Tray Monitor and tray-monitor.conf: This tool runs on windows computers and is found in the windows bacula client installation. It gives the user the chance to monitor what is happening in the bacula environment.
  • Bconsole & bconsole.conf: This is the bacula command line console that is also configured with bacula-dir.conf
  • Bacula File Daemon & bacula-fd.conf: The bacula file daemon offers communication between the storage daemon and the director to back up the files on your client.
Bacula Configuration Files

Bacula Character sets

Bacula is capable of handling more character sets across the world by encoding everything in UTF-8 and expects all configuration files in that format. UTF-8 format is default in Linux machines. The step in ensuring all bacula configuration files are read is making the LANG environment variable to end with UTF-8.

Bacula Resource Directive Format

Bacula directive resources are essential because they have a known keyword resource record to bacula followed by an equal sign and other values. Different resource definition have a name directive and a description directive. The name directive identifies the resource. The description direction is used in displaying the resource for provision of easier recognition by users.

For example:
Director
{Name = "MyDir"
Description = "Main Bacula Director"
WorkingDirectory = "$HOME/bacula/bin/working"}

Comments

When reading the bacula configuration files, blank lines are ignored and details after the hash sign are comments. After a semicolon everything is considered a statement.

Lower and upper spaces and case

The spaces, upper and lower cases are not considered in the directive keywords. Thus keywords like a, m, M, E e, Linux and linux are the same. However, Bacula resource names should have only letters, special characters and numbers.

Authorization, Names and Passwords

Daemons contact each other by authorizing themselves with a password. Passwords correspond to certain names, so the password and name ought to match for authorization to occur. Passwords are plain texts and are not generated by any special process.

Default bacula configuration files are defined automatically for correct authorization with random passwords. Adding and modifying files requires one to take care and ensure consistency of passwords.

Defining detailed Daemon information

The details of each resource, configuration file and the directives permitted are:

  • Client: to define the resources for each client to be backed up. Different specific client resource files on each machine will run a single file daemon.
  • Console: the console defines individual directors available for the user to make interaction.
  • Storage: a single storage daemon controls the tape drives. If the tape drives are on different machines a single storage daemon will be used on each machine.
  • Director: The director defines each storage daemon and client used on the configuration files.

Final Thoughts

The most essential aspect is formatting configuration files based on resources with directives surrounded by “{}” braces. Each bacula component should authorize itself to each other. It is important that all previous default configuration files are modified to match with the current system. When each bacula program begins, they read bacula configuration files on the command line for the director daemon, file daemon, storage daemon and the console program.

Bacula Bootstrap