Upgrading Ubuntu Precise skips database version - Fatal error: Version error for database "bacula". Wanted 14, got 12

Bug #979036 reported by wilfred_com
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bacula
New
Undecided
Unassigned

Bug Description

After upgrading Ubuntu from oneiric to precise the bacula software crashed with the error:

Please correct configuration file: /etc/bacula/bacula-dir.conf
11-abr 09:45 bacula-dir JobId 0: Fatal error: Version error for database "bacula". Wanted 14, got 12
11-abr 09:45 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula".
11-abr 09:45 bacula-dir JobId 0: Fatal error: Version error for database "bacula". Wanted 14, got 12
11-abr 09:45 bacula-dir ERROR TERMINATION

I need to run manualy the upgrade script /usr/share/bacula-director/update_mysql_tables but this doesn't work because they can't read access information but i loged with mysql client and exec one by one the instructions from this file.

The table RestoreObject appeared that already created as equal the new column DeltaSeq in File table, but the VersionId field in table Version isn't updated. Delete this record and insert the new one with version updated fix the problem and now i can restart the director and all works OK.

Revision history for this message
Jerad Jacob (jeradj) wrote :

Another (possibly easier) workaround would be to edit the update_mysql_tables script. Making the following changes worked for me:

Line 11: changed db_name to the name of my database. Ex: db_name=bacula
Line 13: added "-u bacula -p" after ${db_name} inline. The script was giving me errors running as root, so this logs into the database as bacula and prompts you for the database password. Ex: mysql $* -D {db_name} -u bacula -p -e "select VersionID from Version\G" >/tmp/$$
Line 24: added "-u bacula -p" after "$*" here also, just as with line 13. Ex: if mysql $* -u bacula -p -f <<END-OF-DATA

Now when you run the script, you will be prompted for the DB password twice. Enter it, wait a bit, and you should get an "Update of Bacula MySQL tables succeeded" message.

Revision history for this message
James Page (james-page) wrote :

Please see bug 980189 - this is an issue with the packaging in Ubuntu 12.04

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.