# Upgrade from 2.0.0 to 2.1.0

**URL:** <https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771>\
**Category:** Installation\
**Created:** [August 30, 2017, 4:10pm UTC](https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771 "2017-08-30T16:10:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BulletProofFool1](https://community.openhab.org/user_avatar/community.openhab.org/bulletprooffool1/32/80809_2.png) [@BulletProofFool1](https://community.openhab.org/u/BulletProofFool1)\
**Post date:** [August 30, 2017, 4:10pm UTC](https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771/1 "2017-08-30T16:10:12Z")

</div>

Right, I need some help - I have gotten myself totally in a mix.

I originally ran a manual install, but later replaced this with an apt-get install using:  
Please note I am not a linux guy, so I am largely poking this beast with a stick for reactions.

A repo list using apt returns these installs:

openhab2/unstable 2.1.0~20170212123642-1 all  
openhab2-addons/unstable 2.1.0~20170212123642-1 all  
openhab2-addons-legacy/unstable 2.1.0~20170212123642-1 all  
openhab2-online/now 2.0.0~20170108170225-1 all [installed,local]

So this appears to be an apt-get install.

Now according to  
[Backing/Restoring up openHAB2.x](https://community.openhab.org/t/backing-restoring-up-openhab2-x/15950) , my userdata and conf are at:  
/var/lib/openhab2/ and /etc/openhab2/ - which they appear to be (in fact, I have been editing the conf text files and they are having the desired effect)

Which means I should have the details required to follow:  
[http://docs.openhab.org/installation/linux.html#upgrade](http://docs.openhab.org/installation/linux.html#upgrade)

When I look at this though - it tells me:

> If you’re using a version earlier than 2.1.0, then you can use the following commands in Terminal to download the script and run it. Assuming the openHAB directory is in /opt/openhab:

Of course - I don’t have anything in /opt  
In fact: [http://docs.openhab.org/installation/linux.html#file-locations](http://docs.openhab.org/installation/linux.html#file-locations) tells me my repo install installation path should be /usr/share/openhab2 (again this appears correct)

Now here’s the winner . .

If I try follow the upgrade script mentioned above [http://docs.openhab.org/installation/linux.html#upgrade](http://docs.openhab.org/installation/linux.html#upgrade) and I replace the incorrect path (/opt/openhab) with what should be the valid path (user/share/openhab2) the script STILL fails to run

```
blah@openHab2:/$ cd /usr/share/openhab2/
blah@openHab2:/usr/share/openhab2$ ls
addons bin LICENSE.TXT runtime start_debug.sh start.sh
blah@openHab2:/usr/share/openhab2$ sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/openhab/openhab-distro/master/distributions/openhab/src/main/resources/bin/update)" -- 2.1.0
[sudo] password for blah:

#########################################
       openHAB 2.x.x update script
#########################################

The script must be called from openHAB's root directory.
Either specify a directory or place this update script in and run from openHAB's root folder.

```

Now - cracking open the script, I learn that the script is looking for the folders userdata and conf in the current directory - in order to determine that this is in fact a valid openhab root directory.

I’d like to just get to the point where I can upgrade via the script, since I keep coming accross nasties and the solution always seems to be “the nightly release fixed this issue”

Please could someone point me in the right direction - as you can see above, I have spent a fair chunk of time trying to figure this one out

---

<div class="post-metadata">

**Author:** ![Benjy](https://community.openhab.org/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@Benjy](https://community.openhab.org/u/Benjy)\
**Post date:** [August 30, 2017, 5:05pm UTC](https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771/2 "2017-08-30T17:05:46Z")

</div>

Alrighty, I think we’ll need to straighten a few things out first. Hopefully I can help here! 🙂

From the information you provided I can say:

1. You’re currently reading from an old repository.
2. It looks as though you’re using the snapshot version of 2.0.0, which is _older_ than the official release of 2.0.0
3. You are indeed on an automatic install, but are reading the update instructions for the manual process.

Let’s sort these out in order, as always I’d recommend taking a backup first and check the [change log for 2.1.0](https://community.openhab.org/t/openhab-2-1-is-out/30676) and any change that affects you

#### 1. Switching to the latest repository.

The snapshot builds are available on a service called “Artifactory”, previously, they were on a service called Bintray. openHAB was told to move the snapshots, so anyone using Bintray needs to redirect to the new location. As mentioned in the installation docs, the commands to do this are:

```auto
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
sudo apt-get install apt-transport-https
echo 'deb https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main' | sudo tee /etc/apt/sources.list.d/openhab2.list

```

#### 2. Upgrading to 2.2.0 Snapshots

The snapshots always follow the version number of the **next** unreleased version of openHAB, since 2.1.0 is released then the snapshots will be called “2.2.0~[TIMESTAMP]-1”.

On the version that you’re on, openHAB came in two packages called “openhab2-online” and “openhab2-offline”, the reason why it’s not updating at the moment is because the package is now just one thing called `openhab2` where it’s trying to find the latest package called `openhab2-online`. To switch to this, just install `openhab2` and the older package will be dealt with automatically:

```auto
sudo apt-get update
sudo apt-get install openhab2

```

#### 3. Upgrading to the next nightly and so on

You’re all set! From now on, update openHAB just as you would any other Linux program:

```auto
sudo apt-get update
sudo apt-get upgrade

```

The update script only works for manual installations, hence why it’s not working for you.

Let me know how you get on! Good luck!

---

<div class="post-metadata">

**Author:** ![BulletProofFool1](https://community.openhab.org/user_avatar/community.openhab.org/bulletprooffool1/32/80809_2.png) [@BulletProofFool1](https://community.openhab.org/u/BulletProofFool1)\
**Post date:** [August 30, 2017, 8:05pm UTC](https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771/3 "2017-08-30T20:05:34Z")

</div>

Legend Benjy,

Thanks - that worked a treat  
As an added bonus, I created a backup script and also resolved my other issue (basic / classic ui not loading)

Thanks very much again!

---

<div class="post-metadata">

**Author:** ![Benjy](https://community.openhab.org/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@Benjy](https://community.openhab.org/u/Benjy)\
**Post date:** [August 30, 2017, 8:16pm UTC](https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771/4 "2017-08-30T20:16:15Z")

</div>

Awesome, glad to hear it! and that you’ve got a backup script going on top!! There’ll be backup and restore scripts included with openHAB in the future but these haven’t been tested and added yet. Always good to have a way of doing it now! ☺

---

<div class="post-metadata">

**Author:** ![BulletProofFool1](https://community.openhab.org/user_avatar/community.openhab.org/bulletprooffool1/32/80809_2.png) [@BulletProofFool1](https://community.openhab.org/u/BulletProofFool1)\
**Post date:** [August 31, 2017, 8:09pm UTC](https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771/5 "2017-08-31T20:09:46Z")

</div>

Hmmm… a new problem.  
It seems that my items have all disappeared from the PaperUI view (items field itself is missing)

I can see the items in my home.items fille, I can see them through the Rest Api.

Some items were created through the PaperUI interface - and these are still functioning OK - I can see them in the file: org.eclipse.smarthome.core.thing.link.ItemChannelLink.json

I can’t however see any of the items in PaperUI itself.

---

<div class="post-metadata">

**Author:** ![Benjy](https://community.openhab.org/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@Benjy](https://community.openhab.org/u/Benjy)\
**Post date:** [August 31, 2017, 9:39pm UTC](https://community.openhab.org/t/upgrade-from-2-0-0-to-2-1-0/33771/6 "2017-08-31T21:39:40Z")

</div>

Hmm, any clue from the logs? I’m afraid I’m not sure what could be causing this. If you find anything, It might be better to start a new thread now that the original question is answered (not seeing the paper ui items won’t be caused by the update process as such, but might be a bug in a new version?) .
