OH2 crashed, deleted Things and Things backups

Hi, OH2 stopped working so I did a reboot and after that all Things are gone. Items are still there…

I found a thread of how to restore from a backup but found that ALL backups for Things was 0 bytes.

Is their anyway to recover from this?

Best Regards
Emil

RPi user? SD card wearing out?

1 Like

But you copied backups elsewhere in case of hard disk failure, right?

To OP sorry off topic (no help for you)

I’m sorry but we are getting a ton of threads lately with people corrupting there jsondb. This has not been the case since I’ve been around (year - year & 1/2) and I’m beginning to think something is up

When ALL entries in jsondb/backup/ are empty ?
And you have no filesystem level backup ? I’m sorry then no.
Amanda openHABian README

1 Like

What would the point be to backing up 0 byte backups?

I can see you general thought but should you backup your backup of your backup and where does it end?

I can live the general MTBF of memories, CPUs and so on but I have a hard time living with a system that just stops working and removes everything you’ve done and then creates backups with no data in them :stuck_out_tongue:

Trying to help and improve the system here…

Thanks Andrew!

Nice to hear somebody recognizing the spread of the problem and not deflecting the problem back on the person reporting it :slight_smile: Hehe

1 Like

Do you still have the log files from around and before that time? Otherwise it will be just wild guesses and/or good advice about future backup strategies… :wink:

And to be sure: are you running on a Pi with an SD card?

Hi Markus, thanks for answering!

It’s actually not all backups that is empty, just the ones for Things.

I’ll redo everything but would very much like to help and solve this problem, it’s quite a significant issue if you want to keep more novis users. Have everything reset like this is not spiking my enthusiasm :stuck_out_tongue:

Best Regards
Emil

I would love to help out, that’s what this forum is about! Where can I find the log files?

I will surely backup myself from now on; but that is a fix for the symptom and not the issue causing it :slight_smile:

The log files are in the /etc/openhab/userdata/logs directory (if you used the openHABian installation), they are called openhab.log and events.log. Look in openhab.log for [WARN] and [ERROR] entries around and before that time, for starters.

Well, the harder the path … :blush:

Can’t make it undone and tell why it went to 0 bytes but can tell what’s the first things you should do to be prepared this does not happen again.
You should a) setup a backup (preferrably use openHABian and Amanda), b) increase the number of copies jsondb takes which is 5 by default. You can do this in PaperUI under Configuration - System
And c) take regular config backups using openhab-cli backup (eventually setup a cronjob).

Thanks Markus, I will follow your advice from now on :slight_smile: