How to restore or rebuild Openhabian and loose as little as possible

  1. I’d first stop OH.
  2. Then Clear the Cache.
  3. Run openhabian-config and under 10 Apply Improvements and choose 14 Fix Permissions.
  4. Finally restart the RPi.

That should clear the locks problems and the file not found problems.

All of OH config is there. None of the external services you might be using are there though (e.g. Mosquitto, NodeRed, InfluxDB, Grafana, etc.).

If the steps above don’t work, the most expedient way may be to start fresh. Install openHABian again. Copy your openHAB backup to the newly configured image and run openhab-cli restore.

The version numbers of openHABian are independent of openHAB versions because openHAB != openHABian. openHABian is just a bunch of scripts to automatically configure your whole environment in a well known and stable configuration. openHABian itself installs openHAB using apt. You can choose in openhabian-config between the latest release (currently 2.4), testing (currently 2.5 M1) or snapshot (the latest build from last night) under 40 openHAB related.

See above, copy the file over to the backups folder (var/lib/openhab2/backups) and call openhab-cli restore.

Yes.

Yes for InfluxDB, no for MapDB. Everything needed for it will come over with the restore.

You should be able to get this current system back up and running without resorting to starting over from scratch though.