Things lost (JSONDB gone) on upgrade

All things are gone after upgrade from 2.5M5 to 2.5M6
Anyone else with this issues?

What’s the fastest way to restore?

Is it sufficient to restore the following file from the backup subdirectory
org.eclipse.smarthome.core.thing.Thing.json
to /var/lib/openhab2/jsondb ?

It appears you did not use the backup scripts.

Awesome - thanks.
This was indeed new to me.
I just knew about amanda, but didn’t use it yet.

Yes, just upgraded now, from M5 to M6, and all my things (except a few) ended up in the Inbox.
All Z-wave things are gone …
Have rebooted and power-cycled.

openhab> things list
astro:sun:home (Type=Thing, Status=ONLINE, Label=Astro Sun Data, Bridge=null)
astro:sun:minus90 (Type=Thing, Status=ONLINE, Label=Astro Sun Data, Bridge=null)
squeezebox:squeezeboxserver:ed1384c9 (Type=Bridge, Status=ONLINE, Label=SqueezeBox Server, Bridge=null)
deconz:deconz:homeserver (Type=Bridge, Status=ONLINE, Label=deCONZ, Bridge=null)
hue:bridge:2 (Type=Bridge, Status=ONLINE, Label=Hue Bridge, Bridge=null)
mail:smtp:domeneshopsmtp (Type=Thing, Status=ONLINE, Label=SMTP Server, Bridge=null)
openhab>

Unsure how to resolve this.
Will a fallback to M5 fix things?

Your controller too? Does the command sudo dmesg | grep tty seem to see the controller?
Have you tried restarting OpenHAB? I had strange errors until I did that. I opened a GitHub issue.

Yes, both my z-wave and zigbee stick are seen:

omr@shs2:~$ sudo dmesg | grep tty
[    0.000000] console [tty0] enabled
[    7.381329] cdc_acm 2-4:1.0: ttyACM0: USB ACM device
[    7.537152] usb 2-6: FTDI USB Serial Device converter now attached to ttyUSB0
om

Yes, have tried reboot + power-cycle + reboot.
Will try yet another power-cycle

How about this command? The binding should show as Active.

openhab> bundle:list | grep ZWave
208 x Active x  80 x 2.5.0.M6                x openHAB Add-ons :: Bundles :: ZWave Binding

Yes, it did. I also tries restarting it, but I have now started a rollback to M5 to see how that goes.

Same issue going back to M5.
Seems like all my things are in the inbox ready for re-add, except for zwave.

Edit: added the zwave stick manually again, and it came online.

Before re-adding all things from the inbox, I upgrade to M6 again.

Edit2: back on M6 I started adding my 200+ things, and suddenly the java CPU task hit the roof, as I noticed on my initial upgrade from M5 to M6. I’m not certain, because I had a good rhythm adding things, but I belive it started when I added the Ikea Gateway or it may have been a duplicate HUE item.

Will downgrade and attempt re-add on M5

It’s not specific to M5 or M6 but can basically happen on any upgrade, I’ve seen it earlier.
You should be able to copy any of the jsondb backup files back to its place as @NCO wrote. But OH has to be stopped down when you do that.
If your things appear in inbox, there’s also a file called something with discovery (sorry the exact name slipped from memory) that you should be able to safely delete (= Inbox empty).

Thanks for helping out.
When on M6, there is one of my things that causes openhab2 CPU usage to hit 190% and it stays there.
I could not pinpoint exactly which one, as I was adding from the inbox like crazy.
This is exactly what happened when I did the apt-get upgrade as well.

Reverting to M5, I could add the rest of my items, and my system is now slowly coming back to life.
All my thing renames and Location grouping in PaperUI is gone though.

Is it safe just to copy the Things.json or do I need to copy any other backup file as well?

It seems to be running fine now, but I just want to make sure not missing anything.

Thanks.

I have deleted the file (and did a restart of OH afterwards)
org.eclipse.smarthome.config.discovery.DiscoveryResult.json
Which contained the 3 things I have in my inbox. These are actually double entries, because I have these already in the Things list.

However, the inbox still shows these things.

EDIT:
A manual remove from the inbox did work though.

You very likely need to shutdown OH first, THEN delete the file, else OH writes it back on shutdown.

1 Like

IMHO not specific to M6. Also @NCO you seem to be the only one to experience this right now.
Hence moved to own thread.

Sure, That’s fine with me.

I thought the same, but it is still not there.
It hasn’t been recreated.
But never mind.
Deleting manually did the job