My openHAB3.2-stable (using openHABian latest 1.7.3) doesn’t boot anymore. I only see this:
then it blanks.
But if I mount the SD Card to another raspberry, it’ll show me the root-partition with all the files.
What would be the best way to restore the information from the card? I thought of something like
openhab-cli backup but I think the prefix “
/mnt” is not intended to work here… Can i just boot up a vanilla openHABian and boldly overwrite some files from the old SD Card mounted to this? or is there a better way?
There should be two partitions, a fat32 (I think) partition which is labeled “boot” and the ext4 partition which is your root. Can you see both partitions?
Looking at the help text I think you are right. It will only back up from the default locations. However, as long as you install the exact same version of OH on your new RPi, you can just mount the old SD card and, while OH is not running:
sudo cp -R /mnt/etc/openhab /etc/openhab
sudo cp -R /mnt/var/lib/openhab /var/lib/openhab
You might need to reset the permissions after copying.
That will get everything you need openHAB wise off of the old card and on to the new card. You’ll have to set up the other services (e.g. Mosquitto) and read on how to migrate data (e.g. InfluxDB) that isn’t part of OH itself.
yes, I see both of them.
I don’t have services installed on my main openHAB, just openHAB.
So I did and first off I got:
KARAF_ETC is not valid: /var/lib/openhab/etc
So I forced a reinstall of openhab:
sudo apt --reinstall install openhab.
Then I got:
Error in initialization script: /var/lib/openhab/etc/shell.init.script
Which wasn’t even there.
So, before checking, how to fix this I finally did a backup with
openhabian-config (all files were now in the right place anyways!)
Aaaaand now i could just copy that backup to another vanilla openHABian and now it seems to run #aFewHoursLater…
only afterwards I saw, that the JAVA-hperfs were still in
USERDATA/openhab → 1,4GB of it, and my (too old) backups 1,2GB also… #sadlife
But. unfortunately, openHAB still won’t start - wait! It did after a reboot → but with a vanilla installation, and I should type in a new admin-account…
So I deleted all the not needed stuff in the ZIP like:
and imported the ZIP again → same result: openHAB didn’t care for the data present here?
What I found out, the backup restored not into the correct folders!
it should be:
but it was in fact
So, of course, openHAB DID start a vanilla after each restore…?
Still much chaos, but it seems, it did in fact work now - after moving all files from
that is all, except the /persistence files, which are on zram I guess?