[pkg-bacula-devel] Bug#773893: bacula-director-sqlite3: Bacula update to 5.2 - update script of sqlite did not update DB table RestoreObject properly

root rat at d2-online.net
Wed Dec 24 22:08:39 UTC 2014


Package: bacula-director-sqlite3
Version: 5.2.6+dfsg-9
Severity: normal

Dear Maintainer,

When upgrading to bacula 5.2.6 the sqlite database version changes from 12 to 14. Bacula director does not start, when starting with debug option manually:
/usr/sbin/bacula-dir -d 99 -c /etc/bacula/bacula-dir.conf

It gives the error
bacula-dir JobId 0: Fatal error: Version error for database "bacula". Wanted 14, got 12
bacula-dir ERROR TERMINATION


Acording to some vague documentation the script provided here is supposed to resolve this issue
/usr/share/bacula-director/update_sqlite3_tables

The package update and dpkg configure should include this script automatically.

However event if called manually there is still another issue. After completed backup from a windows client we get:

24-дек 23:34 ratix-dir JobId 7405: Fatal error: sql_create.c:1219 Create db Object record INSERT INTO RestoreObject (ObjectName,PluginName,RestoreObject,ObjectLength,ObjectFullLength,ObjectIndex,ObjectType,ObjectCompression,FileIndex,JobId) VALUES ('job_metadata.xml','job', ...... OMITED...... ) failed. ERR=table RestoreObject has no column named ObjectCompression

Looking closer at the script show that there is a typo in the  create table statement.
/usr/share/bacula-director/update_sqlite3_tables

CREATE TABLE RestoreObject (
   RestoreObjectId INTEGER,
   ObjectName TEXT DEFAULT '',
   RestoreObject TEXT DEFAULT '',
   PluginName TEXT DEFAULT '',
   ObjectLength INTEGER DEFAULT 0,
   ObjectFullLength INTEGER DEFAULT 0,
   ObjectIndex INTEGER DEFAULT 0,
   ObjectType INTEGER DEFAULT 0,
   FileIndex INTEGER UNSIGNED DEFAULT 0,
   ObejctCompression INTEGER DEFAULT 0,
   JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
   PRIMARY KEY(RestoreObjectId)
   );

##
ObejctCompression should be ObjectCompression


-- System Information:
Debian Release: 7.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-486
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages bacula-director-sqlite3 depends on:
ii  bacula-common           5.2.6+dfsg-9
ii  bacula-common-sqlite3   5.2.6+dfsg-9
ii  bacula-director-common  5.2.6+dfsg-9
ii  dbconfig-common         1.8.47+nmu1
ii  debconf [debconf-2.0]   1.5.49
ii  file                    5.11-2+deb7u5
ii  libc6                   2.13-38+deb7u4
ii  libcap2                 1:2.22-1.2
ii  libgcc1                 1:4.7.2-5
ii  libpython2.7            2.7.3-6+deb7u2
ii  libssl1.0.0             1.0.1e-2+deb7u12
ii  libstdc++6              4.7.2-5
ii  libwrap0                7.6.q-24
ii  sqlite3                 3.7.13-1+deb7u1
ii  ucf                     3.0025+nmu3
ii  zlib1g                  1:1.2.7.dfsg-13

bacula-director-sqlite3 recommends no packages.

Versions of packages bacula-director-sqlite3 suggests:
pn  gawk  <none>

-- Configuration Files:
/etc/bacula/scripts/delete_catalog_backup changed [not included]

-- debconf information excluded



More information about the pkg-bacula-devel mailing list