[Bug 579924] Re: Upgrading Ubuntu LTS skips database version - Fatal error: Version error for database "bacula". Wanted 12, got 10

Kern Sibbald kern at sibbald.com
Thu Aug 30 16:20:37 UTC 2012


Hello,

The upgrade scripts used to update from one Bacula DB schema to
the next are kept in <bacula-src>/src/cats and have names that begin
with update_   There is one main script named update_bacula_tables
(build during the ./configure command from update_bacula_tables.in).
This script then calls the appropriate SQL backend script (e.g.
update_postgresql_tables to actually do the schema modifications.

That script must be called when installing a new version of Bacula
AND when the database changes (normally only during major version
changes).  The rpm .spec files distributed with the project automatically
call the script when needed, but we do not have .deb scripts, so that
must be done by each packager (e.g. Ubuntu).

That part is fairly straight forward.

However, if you are updating Bacula and going from say version 1.38
to version 5.2.x, you may have several DB updates to make.  These must
be done one at a time, which can be slightly painful to know exactly which
scripts need to be called.  So to make packagers jobs a bit easier we
supply a directory <bacula-src>/updatedb that has all the scripts necessary
to upgrade from one DB version to the next (it may not have the very
latest upgrade which is in src/cats).  If you look in that directory and
read the README file, you should be able to figure out what needs to be
done.  Also looking at the comments at the top of the upgrade scripts
you will probably see what Bacula versions correspond to what DB versions.

In the error message included in your subject line, it looks like the 
prior version
of Bacula was running version 10 of the database schema, and the new version
of Bacula that was loaded wants DB version 12.  This means that the upgrade
script from 10_to_11 must be applied followed by the script from 11_to_12.

I hope this explanation helps.

Best regards,
Kern


On 08/30/2012 05:38 PM, James Page wrote:
> As this bug is still being updated with comments I'm assuming its still
> impacting people.
>
> I took a look at the bacula packages in Lucid - they should be using
> dbconfig-common to do DB upgrades during packaging upgrade and I can see
> the required update scripts at version 3.0.0 (version 11) and 5.0.0
> (version 12).
>
> So I'm a little mystified as to why this is not happening automatically.
>
> I'll do some more investigation.
>

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bacula in Ubuntu.
https://bugs.launchpad.net/bugs/579924

Title:
  Upgrading Ubuntu LTS skips database version - Fatal error: Version
  error for database "bacula". Wanted 12, got 10

To manage notifications about this bug go to:
https://bugs.launchpad.net/bacula/+bug/579924/+subscriptions



More information about the Ubuntu-server-bugs mailing list