Upgrade OH3.4 to OH5.1 | No data persistence

Hi,

I’ve recently upgraded from OH 3.4 to OH 5.1. Erverything works fine. Thanks for the smooth upgrade procedure. Unfortunately the OH 5.1 does not write any data to my MariaDB database. The only thing I’ve changed after the upgrade is the target DB. I could see in the DB status tab, that the user “openhab” is logged in successfully to the database “openhab5”:

The user rights are the same as for the “openhab3” database:

But no item data is stored. But the “items” table was create successfully:

And these are the persistence policies:

I’ve allready restartet the persistence bundle:

{620F373E-CC27-40EF-B7C4-2FE2E8B04396}

Both bundles are available and active:

The jdbc commands run successful as well:

What else could I do to investigate the root cause for my issue? Should I call some kind of reinitialize for the new database? I’ve created all settings in OH 3.4 via the UI and I have no addtional persistence or services settings within /etc/openhab.

Thanks for your support!

When posting configs like this, always click the code tab and post the text instead of screen shots.

Defining the strategies doesn’t actually do anything. You have to actually apply those strategies to the Items you want to have saved using those strategies. For that you need to add one or more configuration where you select the Items (or all Items) and choose the strategy to apply.

Right now you’ve no configurations, so persistence is not going to save anything. In OH 5.1 the default configuration no longer exists (i.e. save every state update of every Item and do restoreOnStartup). You have to define that yourself now.

The upgradeTool should have created this for you, but you don’t mention how you did the upgrade and upgrades from such old versions of OH are not usually tested. So something may have gone wrong.

Thanks

The needed information was, that the default persistence is removed in 5.1. I‘ve added one and now the data is stored.

I‘ve upgraded via apt on an existing openHAB configuration. The update tool gives no information about not applied persistence configuration.