Problem migrating mysql to postgres Wanted 2192, got 2210

54 views
Skip to first unread message

Otto Brandstaetter

unread,
Aug 5, 2022, 3:24:00 PM8/5/22
to bareos-users
Hi,

I just tried to migrate my catalogue from mysql to postgres.
but when I try to run bareo-dbcopy, I get:
Copying tables from "MyCatalog" to "MyCatalog-psql"
05-Aug 21:13  JobId 0: Fatal error: Version error for database "bareos". Wanted 2192, got 2210
05-Aug 21:13  JobId 0: Fatal error: Version error for database "bareos". Wanted 2192, got 2210

Actually I have bareos 20 running on my debian system, but I think I had 21 shortly before I realised that this can not work with mysql anymore.
bareos is working, just the migration is not.
any hints?
Best regards and thanks in advance,
Otto

Otto Brandstaetter

unread,
Aug 5, 2022, 3:25:12 PM8/5/22
to bareos-users
forgot to mention...
if I try update_bareos_tables I get:
Don't know how to upgrade from version 2210 to 2192


aeron...@gmail.com

unread,
Aug 6, 2022, 7:45:30 AM8/6/22
to bareos...@googlegroups.com

if I remember correctly for  the upgrade to work, you need to install the same version of bareos (for the new version) as the old version. do the migration and then upgrade bareos.

bee

--
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/d4ded918-b2ce-4fcb-970a-56b4f41c6582n%40googlegroups.com.

aeron...@gmail.com

unread,
Aug 6, 2022, 7:59:01 AM8/6/22
to bareos...@googlegroups.com

I went looking on the bareos site and found this about the migration

With Bareos 21, we’ve announced End of Life for MySQL. In short, if you haven’t migrated the Bareos catalog yet, please do so now before the upgrade to Bareos 21. Are you running a previous version of Bareos and still rely on MySQL as catalog database? Then upgrade to Bareos 20 first. In Bareos 20, you can migrate the catalog to PostgreSQL using the bareos-dbcopy tool. For more information, please read the HOWTO in your documentation.

hope this helps

Andreas Haase

unread,
Aug 6, 2022, 4:16:13 PM8/6/22
to Otto Brandstaetter, bareos-users
Hello,


Am 05.08.2022 um 21:24 schrieb Otto Brandstaetter <otto.bran...@gmail.com>:

Copying tables from "MyCatalog" to "MyCatalog-psql" 
05-Aug 21:13  JobId 0: Fatal error: Version error for database "bareos". Wanted 2192, got 2210 
05-Aug 21:13  JobId 0: Fatal error: Version error for database "bareos". Wanted 2192, got 2210

Your database seems to have the migrations introduced with Bareos v21. Don’t know whether there is a way to make die dbmigrate work with the new version. If you really know, what you are doing, you could take a look into /usr/lib/bareos/scripts/ddl/updates/postgresql.2192_2210.sql (path of the file may vary on your system) and revert the changes manually. After doing the migration, you can apply the update again. Before doing this, you’d better have a backup of your database ;-)

Regards,
Andreas

Otto Brandstaetter

unread,
Aug 6, 2022, 6:14:39 PM8/6/22
to bareos-users
Thanks for your answer. Yes, this is what happened, I think.
I will have a look at the script, but I am not very optimistic.
The bad thing is, that I am having backups of about 80 tapes or so in that database. Hope that I will be able to revert. Otherwise I would have tons of work for re-creating all backups.
Best regards,
Otto
Reply all
Reply to author
Forward
0 new messages