my sd-card with openhabian 2.3 is broken and i installed a fresh openhabian image with 2.4.0.1 and want to restore my backup files, but i dont have a zip file !?
can i just make a zip of the 2 folders (conf/userdata) and restore the files with
sudo $OPENHAB_RUNTIME/bin/restore /backup/openhab2-backup-20181014_171357.zip
[sudo] Passwort für openhabian:
##########################################
openHAB 2.x.x restore script
##########################################
Using '/etc/openhab2' as conf folder...
Using '/var/lib/openhab2' as userdata folder...
Making Temporary Directory
Extracting zip file to temporary folder.
Backup was not created by openHAB scripts, please resort to a manual restore...
2019-11-22 19:30:08.561 [SCHWERWIEGEND] [org.apache.karaf.main.Main] - Could not launch framework
java.lang.RuntimeException: Could not resolve mvn:org.eclipse.platform/org.eclipse.osgi/3.11.3
at org.apache.karaf.main.util.SimpleMavenResolver.resolve(SimpleMavenResolver.java:59)
at org.apache.karaf.main.Main.createClassLoader(Main.java:467)
at org.apache.karaf.main.Main.launch(Main.java:254)
at org.apache.karaf.main.Main.main(Main.java:178)
The permissions are probably wrong so the openHAB users can’t read it write to them. You copied using sudo meaning the files are owned by root. Charger the ownership to openhab:openhab.
i did a fresh installation and copied the config-folder successfully.
then i tried to copy the userdata folder and i get the framework error again. 2019-11-22 21:50:19.208 [SEVERE] [org.apache.karaf.main.Main] - Could not launch framework
so i deleted the files and copied back the original ones, and OH is running again.
i didnt had a big OH Setup, but would be nice to get something back and save time.
which files/folders do i really need from the USERDATA folder ? so i can test one by one and get hopefully the most back.
The Linux command to do it yourself is sudo chown openhab:openhab <path to file>. See the man page or search for all that chown can do if you don’t use openhab-cli