openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 42 forks source link

Upgrade from 2.4.0.002 to 2.5.0.000 #160

Closed poval82 closed 4 years ago

poval82 commented 4 years ago

Hello, Is there automatic mechanism to upgrade from 2.4.0.002 to 2.5.0.000 ?

cniweb commented 4 years ago

Unfortunately not at the moment. It is best to save the configuration beforehand.

poval82 commented 4 years ago

Do you mean backup and restore scripts in bin folder ?

cniweb commented 4 years ago

No manual copy in a other folder

daniedj commented 4 years ago

Unfortunately not at the moment. It is best to save the configuration beforehand.

I'm not able to find the instructions for updating from 2.4 : I've to remove 2.4 and install 2.5?

TheRealMoeder commented 4 years ago

Yes you have to backup your configuration, uninstall 2.4 and reinstall 2.5. For me, completely moving over conf and userdata was troublesome, so I did the following from Synology ssh console:

1.) Stop openhab 2.4 service 2.) Backup configuration files and persistence: sudo cp -ar /youropenhabfolder/conf /yourbackupfolder/conf sudo cp -ar /youropenhabfolder/userdata/jsondb /yourbackupfolder/userdata/jsondb sudo cp -ar /youropenhabfolder/userdata/persistence /yourbackupfolder/userdata/persistence 3.) Uninstall openhab 2.4 package 4.) Delete remaining files in /youropenhabfolder and recreate addons, conf and userdata folders 5.) Install openhab 2.5 package 6.) open openhab UI to finalize setup and install the needed Addons for your configuration from paperui 7.) stop openhab 2.5 package 8.) sudo cp -ar the files you backed up in step 2 back to /youropenhabfolder 9.) Fix file ownership for the backed up files as installing the new openhab package will create openhab user with a different uid: sudo chown -hR openhab /youropenhabfolder/* 10.) restart openhab 2.5 package 11.) with some patience all should be up and running again.

daniedj commented 4 years ago

Yes you have to backup your configuration, uninstall 2.4 and reinstall 2.5. For me, completely moving over conf and userdata was troublesome, so I did the following from Synology ssh console:

1.) Stop openhab 2.4 service 2.) Backup configuration files and persistence: sudo cp -ar /youropenhabfolder/conf /yourbackupfolder/conf sudo cp -ar /youropenhabfolder/userdata/jsondb /yourbackupfolder/userdata/jsondb sudo cp -ar /youropenhabfolder/userdata/persistence /yourbackupfolder/userdata/persistence 3.) Uninstall openhab 2.4 package 4.) Delete remaining files in /youropenhabfolder and recreate addons, conf and userdata folders 5.) Install openhab 2.5 package 6.) open openhab UI to finalize setup and install the needed Addons for your configuration from paperui 7.) stop openhab 2.5 package 8.) sudo cp -ar the files you backed up in step 2 back to /youropenhabfolder 9.) Fix file ownership for the backed up files as installing the new openhab package will create openhab user with a different uid: sudo chown -hR openhab /youropenhabfolder/* 10.) restart openhab 2.5 package 11.) with some patience all should be up and running again.

thank you! I'll try