Bacula Director will not run

I am running UCS 4.0-1 errata 95. I have installed & configured Univention-Bacula according to the UCS 4 documentation. When the bacula-director service is started in the UMC it reports a successful start but immediately fails. In /var/log/bacula/bacula.log I see:-

06-Mar 15:18 bacula-dir JobId 0: Fatal error: Version error for database "bacula". Wanted 14, got 1016 06-Mar 15:18 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula". 06-Mar 15:18 bacula-dir JobId 0: Fatal error: Version error for database "bacula". Wanted 14, got 1016 06-Mar 15:18 bacula-dir ERROR TERMINATION Please correct configuration file: /etc/bacula/bacula-dir.conf

So a PostgreSQL database version upgrade seems to be required. I found a script for updating from version 12 to 14 at /user/share/bacula-director/update_postgresql_tables but it returns:-

[code]This script will update a Bacula PostgreSQL database from version 12 to 14
which is needed to convert from Bacula Community version 5.0.x to 5.2.x

The existing database is version 1016 !!
This script can only update an existing version 12 database to version 14.
Error. Cannot upgrade this database.[/code]

I had previously installed Bacula Enterprise via the App Centre but subsequently uninstalled it. Perhaps this is a contributor to this issue? Just looking to see if others have found this behaviour & possible workarounds.


I would guess that 1016 is the database version Bacula Enterprise uses when creating it’s initial database, the bacula community edition uses version 14. You probably should have dropped the database created by bacula enterprise prior to installing bacula community.
If you did not do any configuration yet you could completely remove the bacula packages installed, drop the database (dropdb bacula) and install bacula community again. The package should initialize a new database then (like described in the manual Data backup with Bacula).

Janis Meybohm

Thanks for your reply Meybohm. It has allowed me to make progress, but not resolve the issue completely.

I removed all bacula related packages (using the package manager in the UMC). I was able to drop the bacula database as you described. However on re-installing Univention-Bacula, no bacula database is created in postgresql. During install I did notice a message along the lines of “not updating univention/bacula/postgresql”. Is there a log other than dpkg.log that might give me more detail on what happened during re-install?

To be honest I haven’t had a lot of time to spend on this just yet. I will do a lot more digging over the next couple of days & report back. I have been reluctant to remove any Postgresql packages as I really don’t know whether there are other UCS components that rely on it?


you will probably have to purge the bacula packages to remove user data and configuration as well (univention-remove --purge bacula*). This should force the “dbconfig” system to create a new database on installation.
UCS will only use a PostgreSQL databse for the so called software monitor. If it is not installed, UCS will not use any PostgreSQL database (additional apps may do of cause!).

Janis Meybohm

Thank you again Janis for taking the time to assist me. Your suggestion to purge the bacula packages (univention-remove --purge bacula*), while not completely solving my issue, certainly got me on the right track & I have now successfully installed a working univention-bacula set of packages. For the sake of clarity, & for anyone else who might find themselves in the same position, I’ll explain below what solved the issue for me.

Running “univention-remove --purge bacula” removed all the bacula packages & suggested an “apt-get autoremove” to clean up dependencies no longer required (which I did also). Subsequent reinstallation of univention-bacula again failed to create the “bacula” postgresql database. My reference in an earlier post to a message during install “not updating univention/bacula/postgresql” was incorrect. The actual message was “not updating bacula/psql/database”. (I am referring here to the messages displayed below the progress bar in the UMC Package Management module). I would be interested to find if/where those messages are logged to ?

So I then purged the bacula packages once more. I was reminded by your advice about dbconfig, & that postgresql is only required by the “software monitor” which I do not use. So I then ran a purge of the dbconfig & postgresql packages. Funnily enough, during this process, dpkg seemed to think that a number of univention-bacula-enterprise packages required removal, then gave an error those packages could not be found when it attempted to remove them.

In any event, subsequent re-installation of univention-bacula from “Package Management” in the UMC installed all the required bacula, postgresql & dbconfig packages & successfully created the “bacula” postgresql database.

Thanks again Janis. Your help is much appreciated.

Thanks for reporting back your progress!

You may find the logs of the bacula installation via UMC Package Management in /var/log/univention/management-console-module-appcenter.log.

Janis Meybohm