OH 2.5 -> 3.1 Z-wave things and items didn't migrate from backup/restore

My Linux server that was running openhab2 died - I am able to mount the old disk on the new machine, and using /etc/default/openhab2 I was able to set the file location prefixes and create a backup zip file (using /usr/share/openhab2/runtime/bin/backup) of my old openhab2 environment.

It was unclear if I should restore from the “standard” or “–full” backups, but I restored from the standard.

I then restored the zip file to my new server running openhab 3.1 and started the openhab system. The new system is essentially empty as far as things and items are concerned. Some rules came in, some binding came in, but no things or items.

I have no idea where my nicely drawn habpanel house map might come up.

I added the zwave controller as a thing (from the “+” queue), and then all of the other nodes showed up as things to be added, but without any of the names from the old system.

I can see that there are json files (in /var/lib/openhab/jsondb/backup such as: 1609351090984–org.eclipse.smarthome.core.thing.link.ItemChannelLink.json) that seem to contain the information I want - for instance the knowledge that node003 is the Foyer Light Switch, but I don’t see how to get the system to bring these things and items and all of their linkages back in. Is it possible? I fear that if I can’t really restore all of the things and items from backup, I will be chasing a bunch of other syntax bits through every part of the system.

Thanks in advance!

You did notice the folder names changed? Ir would be useful, as a minimum, to study the 3.0.0 and 3.1.0 Release Notes.

One reason for a major version change is there are major breaking changes that are not directly backward compatible with older versions.

You cannot simply restore a 2.X config to a 3.1 server.
Eventually install 2.5.12, restore, then perform the upgrade as mentioned in the 3.0 release notes.

Yes, I noticed the name changes, and I noticed that the backup/restore scripts were very clever in their ability to handle putting files in what appeared to be the right places, but I see that merely moving files is insuffcient.

Getting back to my previous state is worth some effort, so I will try this path, but still have the question: Should I use the “full” backup?

I will attempt:

  1. uninstall openhab 3 from the new machine
  2. install 2.5.12
  3. restore backup file created from the old disk
  4. follow the upgrade path in the 3.0 release notes
  5. upgrade to the latest stable code

Anything I’m missing?

Thanks for the help.


Thank you for the help - removing openhab3, installing 2.5.12, restoring from backup, and then upgrading to 3.x worked well!