Skip to content

Version error for database "bacula". Wanted 1022, got 1023

Summary

| Reproducibility yes | Platform Oracle Linux 8.8 | OS
Oracle Linux | OS Version 8.8 | Product Version | Bacula 11.0.5 | :-------------: |:-------------:|:-----:|:-----:|:--------:| |

Description

Did OS Upgrade from Centos 7.9 to Oracle Enterprise Linux 8.8

Oracle Linux 8.8 got a new Database version: mysql Ver 15.1 Distrib 10.3.35-MariaDB

Steps to Reproduce

  1. run:
  2. /usr/libexec/bacula/update_mysql_tables -u bacula -p
  3. got the error about "Version error for database "bacula". Wanted 1022, got 1023"
  4. bacula-dir daemon will not run anymore

saw that there exist diffent update scripts:

-rw-r--r-- 1 root root 1465 Sep 13 13:39 update_mysql_tables_1022_to_1023
-rw-r--r-- 1 root root 3499 Sep 13 13:39 update_mysql_tables_1021_to_1022
-rw-r--r-- 1 root root 2103 Sep 13 13:39 update_mysql_tables_1020_to_1021

  1. run script: update_mysql_tables_1022_to_1023, which could upgrade the database

expectation

script: /usr/libexec/bacula/update_mysql_tables should do the job !?

Additional Information

mysql Ver 15.1 Distrib 10.3.35-MariaDB, for Linux (x86_64) using readline 5.1

BACULA

bacula-dir: dird.c:1458-0 Could not open Catalog "MyCatalog", database "bacula".
bacula-dir: dird.c:1463-0 Version error for database "bacula". Wanted 1022, got 1023
bacula-dir: mysql.c:353-0 closedb ref=0 connected=1 db=10e5890
bacula-dir: mysql.c:360-0 close db=10e5890
13-Sep 11:15 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

/usr/libexec/bacula/update_mysql_tables -u bacula -p

This script will update a Bacula MySQL database
from any from version 12-15 or 1014-1021 to version 1022
which is needed to convert from any Bacula Enterprise
version 4.0.x or later to version 12.4.x
or Bacula Community versions 5.0.x, 5.2.x, 7.4.x, 9.x.x to
Community version 11.0

Depending on the current version of your catalog, you may
have to run this script multiple times

Enter password:

The existing database is version 1023 !!
This script can only update an existing version 12-16 or 1014-1021 database to version 1022.
Error. Cannot upgrade this database.