1

I have to upgrade thingsboard from version 2.2 to 3.1pe. I can only find upgrade information for upgrading between minor versions.

Will I have to download/install every minor version and call the upgrade script for the previous version or is there a quicker way to upgrade the database directly from 2.2 to 3.1pe?

aschoenebeck
  • 439
  • 7
  • 9

1 Answers1

3

The update procedure is implemented in ThingsboardInstallService ( https://github.com/thingsboard/thingsboard/blob/master/application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java)

As you can see, it is implemented as a switch/case that has no break statements so it will fall through and perform all update-steps for each version up to the latest version in the right order.

lupz
  • 3,620
  • 2
  • 27
  • 43
  • 1
    You should probably add more cases for all versions to avoid confusion and errors. For example, in my case I need to use --fromversion=2.3.0 (or 2.1.3?), because 2.2.0 leads to the "invalid version" error. That' s not very intuitive. – aschoenebeck Sep 04 '20 at 07:32
  • So, the upgrades are done sequentially and automatically. I assume one has still to download the .deb files for all of the versions listed between the current version to the target upgrade version. Is this correct? Or will it suffice to download only the target version .deb files? – DarkCygnus Oct 07 '20 at 20:19
  • 1
    @DarkCygnus you just need the latest/target version of the package. These updates are updates to thingsboards environment (mostly database schema updates like adding new columns and such things). Everything needed to perform the updates is contained in the package itself as long as the package version is greater or equal to the target version. In order to run thingsboard, the update version needs to match the package version. – lupz Oct 08 '20 at 08:51