Best Persistance Services for Restore on Startup on a Pi

Which is the best persistence service to use to save and restore items when rebooting? As I’m using a Pi I’m keen to minimize disk writes and I don’t need any history. I’ve been using rrd4j so far but it seems to struggle with saving a string value.

The RRD4J persistence service only deals in numbers, so it can’t be made to work with strings. I use the MySQL persistence service, but I boot and run my openHAB Pi2 from an external USB disk to avoid wearing out the microSD card. (In fact I have a remote instance that was running openHAB and MySQL on a microSD card, and I suspect it failed due to wearing out the microSD card from excessive writes.) If booting and running your Pi from external USB disk is interesting to you, I used this overview for setting it up.

That explains why I can’t persist my presence information, I’ll change it into a numeric value and change it back again with mappings in the sitemap - thanks!
I wonder if I can use something built into Open Energy Monitor for persistence, They use a v low write setup based around REDIS that only writes to disk when a bunch of data is aggregated to have the least impact on the SD Card, I’m not entirely sure how they do this but I think they moved away from mysql to cut down the writes. I have thought about using a hard disk for everything, but having something without any moving parts appeals especially as my basement is very dusty when I’m woodworking down there. I have a 32Gig card doing a 4 Gig job so I’m hoping the overcapacity together with wear leveling together with taking care of anything that repeatedly writes to disk will keep it from wearing out too soon.

mapdb persistence is exactly what you are looking for. It only stores the latest value and has an inntervall setting to reduce disk writes, it can store all types

1 Like

Fantastic, that’s exactly what I need, I’ll give it a try over the weekend