Bacula Troubleshooting
  • Post category:Uncategorized
  • Post comments:0 Comments

If working on a fresh Bacula deploy, one of the most common errors are the inability of Bacula Director to connect to its MySQL or Postgresql catalog database:

  1. Make sure database services are running.
  2. Make sure the prior Bacula creation and preparation scripts were run successfully.
  3. Make sure bacula can authenticate to the database (Catalog resource Password in bacula-dir.conf or pg_hba.conf file for Postgresql). Database logs can provide more information o authentication errors.

Anyhow, there are a few commands that will lead to Bacula problems diagnosis and will be very useful to further operation.

a) Bacula Test command:

bacula-dir -t

This shell command will test Bacula daemon configuration for syntax errors and also for catalog database connection problems. It can also be used for bacula-sd and bacula-fd. Typically you must restart the Bacula daemon then if no errors are printed (success).

b) The General Bacula Log:

Bacula log file is written in the file set in the bacula-dir.conf, Standard Messages Resource. If you followed this book compilation guide, it will be in: /var/log/bacula.log. It may indicate daemons execution errors and another useful information.

cat /var/log/bacula.log

c) Bacula Daemons Debug Mode:

If running, stop the daemon you need to troubleshoot. Then start it in debug mode. E.x.:

bacula-dir -d 200

The number is the debug level. If higher the level more information the debug output will print at the screen. It can be very useful to discover the cause of spurious daemon behavior and job errors.

d) Job Execution Problems:

To retrieve the full log of any specific job, in bconsole:

list joblog jobid=x

It’s possible to fetch the list of all director executed jobs with another bconsole command:

list jobs

If the cause of the error isn’t still clear, another resort is to run the director and the file daemon in debug mode (explained above), and look for error messages.

Disponível em: pt-brPortuguês (Portuguese (Brazil))enEnglish

Leave a Reply