Upgrade to Bareos 23 on FreeBSD Failed

169 views
Skip to first unread message

Peter Kropf

unread,
Jan 5, 2024, 1:58:35 PMJan 5
to bareos-users
I'm trying to upgrade my Bareos installation on a FreeBSD server from version 22 to 23. After updating the repository via add_bareos_repositories.sh from my subscription, I ran pkg upgrade. That resulted in 

[bare2] [9/9] Extracting bareos.com-director-23.0.0: 100%
pkg: Failed to execute lua script: [string "-- args: "etc/bareos/bareos-dir.d/fileset/Win..."]:3: ')' expected near 'etc'
pkg: lua script failed
pkg: Failed to execute lua script: [string "-- args: "etc/bareos/bareos-dir.d/fileset/Win..."]:3: ')' expected near 'etc'
pkg: lua script failed

Anyone successfully upgraded from 22 to 23? Any insights into what needs to happen to fix this?

Full output of upgrade is attached.

- Peter

bareos.23.upgrade.log

Peter Kropf

unread,
Jan 5, 2024, 2:18:47 PMJan 5
to bareos-users
In /var/log/bareos/bareos.log:


05-Jan 11:05 bareos-dir JobId 0: Fatal error: Version error for database "bareos". Wanted 2230, got 2210
05-Jan 11:05 bareos-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bareos".
05-Jan 11:05 bareos-dir JobId 0: Fatal error: Version error for database "bareos". Wanted 2230, got 2210
05-Jan 11:05 bareos-dir ERROR TERMINATION
Please correct the configuration in /usr/local/etc/bareos/bareos-dir.d/*/*.conf


Seems the upgrade of bareos-dir failed as it was expecting the database to be version 2230 but it's at 2210. 

Anyone know how to upgrade the database to 2230?

aeron...@gmail.com

unread,
Jan 5, 2024, 2:33:59 PMJan 5
to bareos...@googlegroups.com

On my ubuntu system I had to run

/usr/bareos/lib/scripts/update_bareos_tables

Hope that helps

--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/6f62229b-53cd-4c2b-8d38-75fd1459bb2bn%40googlegroups.com.

Peter Kropf

unread,
Jan 5, 2024, 4:29:25 PMJan 5
to bareos-users
I don't see a update_bareos_tables script on my system. I suspect that the Lua script that's throwing errors is preventing the database update to run. Unfortunately I'm not sure how to debug this.

Peter Kropf

unread,
Jan 5, 2024, 6:09:17 PMJan 5
to bareos-users
Digging a bit more into the packages, it looks like the postgresql.2210_2230.sql file wasn't included sometime in the 22.1.x release release cycle. In my FreeBSD jail as root:

cp postgresql.2210_2230.sql /usr/local/lib/bareos/scripts/ddl/updates/
su - postgres
psql bareos </usr/local/lib/bareos/scripts/ddl/updates/postgresql.2210_2230.sql

Once the database was upgraded to the correct version, my installation seems to be working again. I don't know if the original lua error is anything to be concerned about but I'm in the process of testing various workflows and will update this if I find any issues.

Meggie Hallenbach

unread,
Jan 6, 2024, 10:48:01 PMJan 6
to bareos-users
Alexander Frankenhauser posted the same problem a few weeks ago (17.12.2023)


"Fatal error: Version error for database "bareos". Wanted 2230, got 2210"

Bruno Friedmann (bruno-at-bareos)

unread,
Jan 8, 2024, 3:47:34 AMJan 8
to bareos-users
Hi There a number of Pull request concerning FreeBSD improvement installation and update that are in the process to be merged.
They will bring the missing update script which you can download directly from the source code repository if needed https://github.com/bareos/bareos/blob/master/core/src/cats/ddl/updates/postgresql.2210_2230.sql

So the goods are coming ;-)
Reply all
Reply to author
Forward
0 new messages