[pkg-bacula-devel] Bug#1108272: bacula-director-pgsql: update_postgresql_tables script fails due to bad shell quoting

Sven Hartge sven at svenhartge.de
Thu Jun 26 06:03:38 BST 2025


On 24.06.25 18:18, Wouter Verhelst wrote:

> I installed the bacula director from backports, so that my laptop (which
> runs unstable) can still be backed up to my server (which runs stable).
> 
> After the upgrade to bacula 15, I noticed that my director was no longer
> running. Checking the logs, I found the following:
> 
> 24-jun 18:00 bacula-dir JobId 0: Fatal error: Version error for database "bacula". Wanted 1026, got 1024
> 24-jun 18:00 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula".
> 24-jun 18:00 bacula-dir JobId 0: Fatal error: Version error for database "bacula". Wanted 1026, got 1024
> 24-jun 18:00 bacula-dir ERROR TERMINATION

Interesting that the Upgrade Script via dbconfig did not run. Have you 
configured the bacula packages to not use dbconfig? Or has some sequence 
caused it to fail?

Could you check apts history or term logs to check of anything related 
to the upgrade?

> This surprised me, because obviously there's a script to handle this. So
> I ran it manually, and received errors about SQL syntax where it said
> "do <number>".
> 
> Checking the script, I quickly found the problem. Here's a patch that
> solved it for me:
> 
> --- update_postgresql_tables.orig	2025-06-24 18:14:43.055571381 +0200
> +++ update_postgresql_tables	2025-06-24 18:15:04.866426330 +0200

That is upstreams script that is not used directly by the packages, 
which use an extracted version via dbconfig, so that bug will not 
directly affect users using the Debian-way-of-things to maintain the 
database.

I can see the correct quotation of $$ in the source for that script, but 
this seems to get mangled during build.

Grüße,
Sven.



More information about the pkg-bacula-devel mailing list