OH2: Switching from beta to snapshot

Hi,
first I tried to install OH2 using the snapshot release and failed.
Then I formatted everything, installed OH2b4 and so far most of the things work fine, but I want to have the latest versions of e.g. the bindings without waiting for the next beta.

So, my idea was: Just change from the beta version to the snapshot version by changing the repository as described here (http://docs.openhab.org/installation/linux.html#package-repository-installation) to “snapshot” and just make an apt-get upgrade.

But after I did this, apt-get tells me, that there are no updates available.
And I don’t believe that there were no nightly builds since 2.0b4

Do you have a hint for me?
Or do I have to start from scratch again?

Thanks,
Boby

PS: Before the apt-get upgrade I did an apt-get update - and apt showed me the cloudbees repositories

And as I tried to do a reinstall of the offline (sudo apt-get install --reinstall openhab2-offline), it said I cannot do this because it cannot be downloaded

Hey, I remember that error. Have a look: APT snapshot installation notice

1 Like

Thom, thanks. But it doesn’t solve my problem because it still says, there are no updates.
And I don’t believe there were no updates published since the Beta4…or may I be wrong?

Sadly I can not reproduce this on my test system because I did a cleaner switch by purging the existing package and then reinstalling the new one. Could you try a remove followed by install? Hopefully remove instead of purge will be enough.

1 Like

I will. Any directories I do have to backup before?
Nevermind…remove already running :smiley:

Seems like you are now up to date. How did you accomplish that?

I have also the problem. I would like to switch from the beta4 release to snapshot. my beta4 is installed using apt-get. How can I perform this? I tried to change the sources according to the docu and then tried ‘apt-get update’, ‘apt-get upgrade openhab2-online’. It always states “no updates available”…

If I have to uninstall first, which folders shall I backup. For sure configuration in /etc/openhab2. But where is the “userdata” folder in an apt-get installation. Anything else?

As there was no answer, I write here what I did, so maybe someone running into the same question finds an answer.
I installed OH2 beta4 with apt-get. So I thought let’s just update the sources of apt and do an

apt-get install --reinstall openhab2-online

of course this was not successful. So I had to reinstall. I was afraid of loosing all my config. So I backed up
the configuration:
sudo cp -R /etc/openhab2 ~/oh2bkp/etc
and the user data
sudo cp -R /var/lib/openhab2 ~/oh2bkp/var

However, actually it was not required as with apt-get remove the configuration is not removed. So finally the simple thing to perform is

  1. make sure your sources point to the snapshot release-
$ cat /etc/apt/sources.list.d/openhab2.list
deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/ /
deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/ /
  1. remove the OH2 beta4 with
apt-get remove openhab2-online
  1. install the snapshot with
apt-get install openhab2-online

After this, OH2 snapshot is installed. I had some strange exceptions so I cleaned up by
A.1) removing old addons from the addons folder
A.2) deleted the contents from the cache folder /var/lib/openhab2
A.2) deleted the contents from the tmp folder /var/lib/openhab2