restoreOnStartup for InfluxDB


I’ve migrated from mysql to influxdb. All works fine, except the restoreonstartup.
Is it supported on influxdb? How can I debug it? Which modules should I set to which log-level?

The persist:

Items {
    alarm_switch : strategy = everyUpdate, restoreOnStartup


Number alarm_switch                 "Alarm Switch" <shield>



This doesn’t answer your question but have you considered using mapdb for restore on start up?
This database is included in OH and only saves the last state so never grows…
I still use influx for longer duration persistence and graphing

My mapdb.cfg:

// mapdb persistence

Strategies {
	default = everyChange
Items {
	* : strategy = everyChange, restoreOnStartup

Works like charm!

Hello @vzorglub !

Never used. No problem to switch to it, overall if it’s saving ONLY the last value.
I like it!
I think I could switch to it without having to troubleshoot a lot about influx and restoring everything on startup ike you! :slight_smile:
Some simple questions:
Do I need to enable it (like via Habmin) or enough to put the file into the ‘persistence’ folder?
It’s possible to browse the content?



You install the mapdb persistence service through the paperUI
The mapdb.cfg should be automatically created in your persistence folder

You don’t need to switch to it. You can use several persistence services simultaneously.

Of course I’ll not switch on it for all, only for my “RestoreOnStartUp” variables (which now could be all).
BTW is there a way to read manually the content of the mapdb?


1 Like