New Openhabian

okay here is my problem :smiley:
i have a sd card with my openhabian but it doesn’t start as it should, so i connected the sd card to my pc and saved everything.
Now I have reinstalled openhabian on a new sd card and copied the files from /var/lib/openhab and /etc/openhab from the old backup and overwritten them with the data from the newly installed openhabian.
But then it doesn’t work anymore, that means I made a mistake somewhere, do you know where?
Openhabian works as usual without the overwriting (I can access everything via http://localhost:8080 and create a new account)
If I overwrite the two files mentioned above with my old data, I can no longer access anything via http://localhost:8080, even in the logs I don’t see any corresponding error message.

Is openhab service running?
Make sure that all files you restored are owned by user openhab. In case you are using openhabian there is a menu item in the config tool (openhabian-config).
Did you restart your Pi device after restore?
Did you stop openhab before restoring your data?
Did you restore your data to the same openhab version you did your backup from?

thanks for the answer, let’s start at the top
to 1, I’m not sure exactly how I see it, but since I can access the menu etc. so I think the service is running.
2. yes i have already done that and made all files owned by user openhab
3. i did the restore on an external pc, which means i put both sd cards in and overwrote the corresponding files
4. as mentioned in point 3 I did the whole thing offline anyway and externally on a pc so I think yes?
5. this point is still open no it is most likely a different version do you have a quick tip where i can read the version of my old files and download older versions?
thanks again for your help

The fact you can access the „menu“ (I assume openhabian-config?) doesn‘t mean that openhab is running. Plase run

systemctl status openhab.service

If openhab is not running start the service

sudo systemctl start openhab.service

and watch for error messages

Btw, are able to insert the original sd card and can run the backup command from command line?

sudo /usr/share/openhab/runtime/bin/backup
sudo openhab-cli backup

please also remove all files from /var/lib/openhab/tmp folder or run

sudo openhab-cli clean-cache

okay thanks, i now see error messages in the logs, the service does not start the status is on:

activating (auto-restart) (Result: exit-code)

and the process that throws the error is probably the following:

    Process: 4839 ExecStart=/usr/share/openhab/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=255/EXCEPTION)

I now also see something in the logs:

2023-12-17 00:48:30.740 [SEVERE] [org.apache.karaf.main.Main] - Could not launch framework

java.lang.RuntimeException: Could not resolve mvn:org.eclipse.platform/org.eclipse.osgi/3.16.200

	at org.apache.karaf.main.util.SimpleMavenResolver.resolve(

	at org.apache.karaf.main.Main.createClassLoader(

	at org.apache.karaf.main.Main.launch(

	at org.apache.karaf.main.Main.main(

the error message is repeated permanently every few seconds.

When did you restore your files? You should have bring up openhab after a clean install or clean image first so that the auto-setup script is able to complete the installation. After you made sure OH is running, then stop oh service and restore your files.

Again, is it possible for you to do a backup with the commands above from command line on your broken sd card?

no my broken sd card isnt doing anything :frowning:

OH was executed once before and everything worked, I also came to openhab:8080 and could have set everything there, so that worked. after that I copied the data

Another suggestion to reduce potential error: Instead of copying both folders from sd card to another sd card via a windows PC, I would insert the broken sd card via a usb adapter to your linux device and do a native linux copy command. Just in case that there are no character set conversions whatsoever.
Also make sure that you are not trying to restore oh3 data to a new oh4 image

Have a look into the history log files in /var/log/apt. On a linux system you can do something like

zgrep /var/log/apt/openhab history.log*

What also looks like to work is although this seems to be just a work around not knowing the correct file to check.

egrep '^feature.openhab.*="openhab' /var/lib/openhab/config/profile.config