Influx db - data lost after reboot!?

Let’s assume your influxdb is running on the same box as openHAB, or you probably would have said if not.

By searching your old posts, you talk about using openhabian, so I am going to have to guess that you use openhabian here. If you don’t know anything about zram, you have almost certainly got that active as well by default.

So the effect you described in post #1 is exactly what we’d expect to see when using a database in zram. Power fail - poof, all live data disappears.
It will usually auto-recover back to the last time you did a tidy planned shutdown, could be weeks ago.

Zram is there to improve performance. As a side effect, it reduces “wear” and extends the life of SD cards. Especially helpful if you have let persistence settings default to “everything”.

So now you have choices.
One choice is to turn zram off.
Another is to exclude from zram just the influx service.
Another is to find out how to take regular checkpoints of the service, so that if there is a failure you only lose, say, a day’s data.

In all cases, if you are not already selecting what/when you have influxdb persist, it would probably bea good idea to review it.
Any any other databases you have, like the default rrd4j.