Star

Installation

Documentation for installation and configuration of ThingsBoard IoT Platform.

Upgrade instructions

Prepare for upgrading ThingsBoard (CentOS, Ubuntu)

Stop ThingsBoard Check if ThingsBoard and database services are running Initially ThingsBoard, check status to ensure it is stopped and then databases.

$ sudo systemctl stop thingsboard
$ sudo systemctl status thingsboard

Backup Database

Make a backup of the database before upgrading.

PostgreSQL

Check PostgreSQL status. It is unnecessary to stop PostgreSQL for the backup.

$ sudo systemctl status postgresql

Make sure you have enough space to place a backup of the database
Check database size

$ sudo -u postgres psql -c "SELECT pg_size_pretty( pg_database_size('thingsboard') );"

Check free space

$ df -h /

If there is enough free space - make a backup.

$ sudo -Hiu postgres pg_dump thingsboard > thingsboard.sql.bak

Check backup file being created.

Cassandra

Check Cassandra status. It is necessary to stop Cassandra for the backup.

$ sudo systemctl status cassandra

Flush all memtables from the node to SSTables on disk.

$ nodetool drain

Stop Cassandra.

$ sudo systemctl stop cassandra

And you have to check the status again to ensure they are surely stopped.

$ sudo systemctl status cassandra

Make sure you have enough space to place a backup of the database
Check database size.

$ du -h /var/lib/cassandra/ | tail -1

Check free space.

$ df -h /

Make a backup of Cassandra database.

$ mkdir backup
$ sudo tar -cvf backup/cassandra.tar /var/lib/cassandra

Check archive being created

Start Database

Cassandra

$ sudo systemctl start cassandra

PostgreSQL Do nothing, postgresql is already running.

Upgrading to 2.4.1PE

These steps are applicable for 2.4.0PE ThingsBoard Professional Edition version.

Ubuntu/CentOS

ThingsBoard PE package download

resources/2.4.1pe/thingsboard-ubuntu-download.sh
wget https://dist.thingsboard.io/thingsboard-2.4.1pe.deb
resources/2.4.1pe/thingsboard-centos-download.sh
wget https://dist.thingsboard.io/thingsboard-2.4.1pe.rpm

ThingsBoard PE service upgrade

$ sudo service thingsboard stop
resources/2.4.1pe/thingsboard-ubuntu-installation.sh
sudo dpkg -i thingsboard-2.4.1pe.deb
resources/2.4.1pe/thingsboard-centos-installation.sh
sudo rpm -Uvh thingsboard-2.4.1pe.rpm

NOTE: Package installer will ask you to merge your thingsboard configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.
Please make sure that you set database.entities.type and database.ts.type parameters values (in the file /etc/thingsboard/conf/thingsboard.yml) to “cassandra” instead of “sql” in order to upgrade your cassandra database:

    database:
      entities:
        type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql
      ts:
        type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
# Execute upgrade script
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.0 

Start the service

$ sudo service thingsboard start

Windows

ThingsBoard PE package download

Download ThingsBoard PE installation package for Windows: thingsboard-windows-setup-2.4.1pe.exe.

ThingsBoard PE service upgrade

net stop thingsboard

NOTE Scripts listed above should be executed using Administrator Role.

C:\thingsboard>upgrade.bat --fromVersion=2.4.0

Start the service

net start thingsboard

Upgrading to 2.4.2.1PE

These steps are applicable for 2.4.1PE and 2.4.2PE ThingsBoard Professional Edition versions.

Ubuntu/CentOS

ThingsBoard PE package download

resources/2.4.2.1pe/thingsboard-ubuntu-download.sh
wget https://dist.thingsboard.io/thingsboard-2.4.2.1pe.deb
resources/2.4.2.1pe/thingsboard-centos-download.sh
wget https://dist.thingsboard.io/thingsboard-2.4.2.1pe.rpm

ThingsBoard PE service upgrade

$ sudo service thingsboard stop
resources/2.4.2.1pe/thingsboard-ubuntu-installation.sh
sudo dpkg -i thingsboard-2.4.2.1pe.deb
resources/2.4.2.1pe/thingsboard-centos-installation.sh
sudo rpm -Uvh thingsboard-2.4.2.1pe.rpm

NOTE: Package installer will ask you to merge your thingsboard configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.
Please make sure that you set database.entities.type and database.ts.type parameters values (in the file /etc/thingsboard/conf/thingsboard.yml) to “cassandra” instead of “sql” in order to upgrade your cassandra database:

    database:
      entities:
        type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql
      ts:
        type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
# Execute upgrade script
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.1

Start the service

$ sudo service thingsboard start

Windows

ThingsBoard PE package download

Download ThingsBoard PE installation package for Windows: thingsboard-windows-setup-2.4.2.1pe.exe.

ThingsBoard PE service upgrade

net stop thingsboard

NOTE Scripts listed above should be executed using Administrator Role.

C:\thingsboard>upgrade.bat --fromVersion=2.4.1

Start the service

net start thingsboard

Upgrading to 2.4.3PE

These steps are applicable for 2.4.2PE and 2.4.2.1PE ThingsBoard Professional Edition versions.

Ubuntu/CentOS

ThingsBoard PE package download

resources/2.4.3pe/thingsboard-ubuntu-download.sh
wget https://dist.thingsboard.io/thingsboard-2.4.3pe.deb
resources/2.4.3pe/thingsboard-centos-download.sh
wget https://dist.thingsboard.io/thingsboard-2.4.3pe.rpm

ThingsBoard PE service upgrade

$ sudo service thingsboard stop
resources/2.4.3pe/thingsboard-ubuntu-installation.sh
sudo dpkg -i thingsboard-2.4.3pe.deb
resources/2.4.3pe/thingsboard-centos-installation.sh
sudo rpm -Uvh thingsboard-2.4.3pe.rpm

NOTE: Package installer will ask you to merge your thingsboard configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.
Please make sure that you set database.entities.type and database.ts.type parameters values (in the file /etc/thingsboard/conf/thingsboard.yml) to “cassandra” instead of “sql” in order to upgrade your cassandra database:

    database:
      entities:
        type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql
      ts:
        type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
# Execute upgrade script
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.2

Start the service

$ sudo service thingsboard start

Windows

ThingsBoard PE package download

Download ThingsBoard PE installation package for Windows: thingsboard-windows-setup-2.4.3pe.exe.

ThingsBoard PE service upgrade

net stop thingsboard

NOTE Scripts listed above should be executed using Administrator Role.

C:\thingsboard>upgrade.bat --fromVersion=2.4.2

Start the service

net start thingsboard

Next steps