I’d like to easily rehost from my linux platform to openhabian to retain continuity of quite a bit of data I’ve collected over several months.
Is it plausible to rehost my OH2 system from my linux platform to Openhabian by stopping OH2, moving over the current Gen5 Zstick and copying the following files to their normal locations (unless otherwise noted);
JSON file
everything under /etc/openhab2/ such as rules, things, items, etc
I would use the backup and restore scripts that OH comes with (it’s in the bin folder). Run the backup. Copy the resultant tar file to same location on the new host. Then run restore. That should capture everything in a fool proof manner.
If you really want to do it yourself, I would grab everything under /etc/openhab2 and /var/lib/openhab2 except for the cache and tmp folders. That should capture everything.
And to elaborate on job’s response. A USB thumb drive is also just flash memory. Moving the logs, persistence, and swap to a USB thumb drive may save your SD card but it will wear out the thumb drive. You haven’t solved the problem, only moved it.
HDDs and SDDs do not have the same wear out issues (despite being flash, SDDs have room to add additional technology to address some of the limitations of SD cards).
And before Marcus chimes in, I’ll say what he will say. You should spend your first efforts on a backup and restore strategy. You will need one anyway and once you have a solid backup and restore process SD card corruptions and the like aren’t that big of a deal anymore.
Thanks @rlkoshak , the backup is very simple. I’m assuming the influxdb backup would happen at the same time, and I would restore the influxdb first, then restore OH2, then start OH2.
The OH backup and restore only handles OH. InfluxDB is it’s own server and stores and manages its configuration and data completely separately from OH. To migrate InfluxDB you will need to look at their docs for how to best do that. It will probably be as easy as grabbing /etc/influxdb and /var/lib/influxdb, but I can’t say that for sure.
On a similar note, Mosquitto, Grafana, and any other third party application you may be running will need to be backed up and migrated separately.