How to upgrade OH3.0 to OH3.1

Hi all
Searching for info on how to upgrade my OH3.0 installation to the new 3.1. Running as a service on an Win10 PC.
No idea how to do that at all …any help would be really cool :slight_smile:


The update procedure that is described here:

is not enough ?

1 Like

That would be wonderful …but it doesn’t work at all. If I start the PS like described it does nothing. No info at all. If I start the update.bat it doesn’t find the version. Any hints how to update my installation by hand?

windows is not my core competence.
Is there any error message ? May be in eventlog ?
What is the exit code of the script ?
Because of sunset of bintray your OH 3.0.X version might be of interest and could be the reason why the script does not seem to do anything.
Could it be that you are on a version below 3.0.2 ?
If that is the case you may have to change the URL in the script manually.
Have a look at the code line that looks similar to

$DownloadLocation = "$OHVersionName/openhab-$"

Yours might point to bintray instead of
You may backup the existing script and change the URL.

yes, I’m on 3.0.0 …did also the addon path change? Could you please also paste the one here

Tried that …multiple issues came up:

  • Had to modify the script cause there’s an error with the backup integrated into (path length I think). After modifying that (disabled the backup) it worked
  • After all has been done restartet my machine
    ** openhab startet
    ** basic ui is gone (all my pages also)
    ** no rules worked
    …had to restore from my own backup. Now I’m on 3.0.0 again

Ist there any procedure how to do a clean install of 3.1.0 and then to restore only the config (things, pages, rules, …)?

have you seen any error message in openhab log or in windows eventlog ?

  • in c:\openhab\runtime\bin you should find backup.bat and restore.bat
  • running them without any argument in a command box will show their usage
  • use backup.bat to create a backup of the configuration
  • use restore.bat to restore the configuration

OK. I did the trick. Your hint wasn’t the solution but got me to investigate more on that. Finally I got it to run …for all with similar issues on Windows here the full story:

  • As Wolfgang suggested I tried to backup my config for a clean setup. Surprise …that didn’t work at all. The error I’ve got was something about a file on a long path with not found exception.
  • The issue wasn’t a file which was not found but the path length …the backup script tries to copy everything to the user temp path, which in normal case is something with username and in my case the user is a domain user …so the temp path includes also the domain …long story short …my solution was to change the environment variable to a shorter string. After that the backup script was successful.
  • After that success also the update script was successful (it has a backup included which stopped in my case because of the issue already mentioned above)
  • After also this script was successful I started my windows service …btw, you don’t have to uninstall your service before of the update …but stopping it is mandatory
  • After a restart …nothing worked! …no rules, no ui, nothing :frowning: …but I was able to log in to the dashboard.
  • Was almost to restore my copy of the full directory (copy the full path of your installation as the first step!!) but then I’ve had a look at the things …no one was online :expressionless: !!
  • Ok …next to the bindings …all gone :frowning:
  • after installation of all bindings which were there before …everything worked again an all things were onine :slight_smile:

Have to fix the persistence to maria DB but then I’ve a working installation on 3.1.0

puuuuh :slight_smile:

1 Like