Problem upgrading from h2 version 2.1.214 to 2.2.220

718 views
Skip to first unread message

Fredrik Sjögren

unread,
Aug 2, 2023, 11:07:04 AM8/2/23
to H2 Database
When we have upgraded the h2 library we get following error trying to open the existing databases:

Unsupported database file version or invalid file header in file "/path/to/database.h2.mv.db" [90048-220] 90048/90048

We use a file based database ("jdbc:h2:file:...")

Creating new databases works well.

Has something changed so the files are not compatible?
Any way to get around this in an easy way? The upgrade from version 1 was a hassle for us earlier and we really wish not to do that again.
Is there any way to get more information about why it gets this error?

Noel Grandin

unread,
Aug 2, 2023, 12:43:42 PM8/2/23
to h2-da...@googlegroups.com
You are going to need to do a dump/restore for this upgrade.
Elsewhere on this group someone posted a link to a different tool that they wrote that helps with migration - that might be useful.

I just normally code up some batch/shell files and run the backup and restore tools.

Andreas Reichel

unread,
Aug 2, 2023, 7:22:40 PM8/2/23
to h2-da...@googlegroups.com
Greetings.

You will need to Export to SQL Script and Create new DB from SQL Script.
I wrote an UI that can help you with that: https://manticore-projects.com/H2MigrationTool/index.html

There is an online version for testing small databases: http://h2migrationtool.manticore-projects.com/

Cheers
Andreas
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/619938c2-25f5-47cd-909c-c2cb1796464fn%40googlegroups.com.

Thomas Hurley

unread,
Aug 3, 2023, 8:37:02 AM8/3/23
to H2 Database
Noel, Andreas 

I am Product Manager for 3 products all using H2 DB and backwards compatability for updates is really an essential feature for us.  All of our products are onpremise deployments with marquee names in regulated industries so this migration process your refer to is not ideal for us at all.  We allready ran through a migration process in a recent upgrade on one of our products and it took Fredrik and team some time to get that working efficientlly where it would not have an impact on key customers.  We update dependencies now with regularity to ensure maintenance and security is efficient to having to run this migration process for each product for each version upgrade is not what we want.  Is there a plan to make H2 DB updates backward compatible so we can just bump versions without migration scripts having to be implemented? 

Noel Grandin

unread,
Aug 3, 2023, 9:05:25 AM8/3/23
to h2-da...@googlegroups.com, Thomas Hurley


On 8/3/2023 1:10 PM, Thomas Hurley wrote:
> I am Product Manager for 3 products all using H2 DB and backwards compatability for updates is really an essential

This is an open-source volunteer project, not a commercial offering, so no, we are not planning anything like that.

You are more than welcome to assign some of your engineers to help improve H2 on company time, however.
Reply all
Reply to author
Forward
0 new messages