Stand with Ukraine flag
Pricing Try it now
Community Edition
Getting Started Documentation Devices Library Guides
Architecture API FAQ
On this page

ThingsBoard CE v3.1.x upgrade instructions for CentOS

Upgrading ThingsBoard CE to 3.1.1

NOTE: These upgrade steps are applicable for ThingsBoard version 3.1. In order to upgrade to 3.1.1 you need to upgrade to 3.1 first.

ThingsBoard package download

1
wget https://github.com/thingsboard/thingsboard/releases/download/v3.1.1/thingsboard-3.1.1.rpm

ThingsBoard service upgrade

  • Stop ThingsBoard service if it is running.
1
$ sudo service thingsboard stop
1
sudo rpm -Uvh thingsboard-3.1.1.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.ts.type parameter value (in the file /etc/thingsboard/conf/thingsboard.yml) to “cassandra” instead of “sql” if you are using Cassandra database for timeseries data:

1
2
3
4
database:
  ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records
  ts:
    type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale)

Execute regular upgrade script:

1
sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.1.0

Start the service

Doc info icon

If you use Redis for caching, you need to flush all stored keys before starting the ThingsBoard.

Connect to your Redis instance (or container/pod, depending on your setup) and run the command:

redis-cli flushall

Please note that this command is applicable only if you use Redis exclusively for ThingsBoard. If other applications use Redis, you need to locate the ThingsBoard database and flush only that. The default database index is 0, configurable with REDIS_DB ThingsBoard environment value.

redis-cli

select 0

flushdb

Doc info icon

If you use Redis for caching, you need to flush all stored keys before starting the ThingsBoard.

Connect to your Redis instance (or container/pod, depending on your setup) and run the command:

redis-cli flushall

Please note that this command is applicable only if you use Redis exclusively for ThingsBoard. If other applications use Redis, you need to locate the ThingsBoard database and flush only that. The default database index is 0, configurable with REDIS_DB ThingsBoard environment value.

redis-cli

select 0

flushdb

1
sudo service thingsboard start

Upgrading ThingsBoard CE to 3.1

NOTE: These upgrade steps are applicable for ThingsBoard version 3.0.1. In order to upgrade to 3.1 you need to upgrade to 3.0.1 first.

ThingsBoard package download

1
wget https://github.com/thingsboard/thingsboard/releases/download/v3.1/thingsboard-3.1.rpm

ThingsBoard service upgrade

  • Stop ThingsBoard service if it is running.
1
$ sudo service thingsboard stop
1
sudo rpm -Uvh thingsboard-3.1.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.ts.type parameter value (in the file /etc/thingsboard/conf/thingsboard.yml) to “cassandra” instead of “sql” if you are using Cassandra database for timeseries data:

1
2
3
4
  database:
    ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records
    ts:
      type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale)

NOTE: Cassandra database does not support advanced filters. If you were using Cassandra database for timeseries data please make sure that database.ts_latest.type parameter value (in the file /etc/thingsboard/conf/thingsboard.yml) is “sql”:

1
2
3
4
  database:
  ...
    ts_latest:
      type: "${DATABASE_TS_LATEST_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale)

and execute the following migration script:

1
2
# Execute script to migrate latest timeseries data from Cassandra to PostgreSQL
sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=cassandra-latest-to-postgres

Execute regular upgrade script:

1
sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.0.1

Start the service

Doc info icon

If you use Redis for caching, you need to flush all stored keys before starting the ThingsBoard.

Connect to your Redis instance (or container/pod, depending on your setup) and run the command:

redis-cli flushall

Please note that this command is applicable only if you use Redis exclusively for ThingsBoard. If other applications use Redis, you need to locate the ThingsBoard database and flush only that. The default database index is 0, configurable with REDIS_DB ThingsBoard environment value.

redis-cli

select 0

flushdb

Doc info icon

If you use Redis for caching, you need to flush all stored keys before starting the ThingsBoard.

Connect to your Redis instance (or container/pod, depending on your setup) and run the command:

redis-cli flushall

Please note that this command is applicable only if you use Redis exclusively for ThingsBoard. If other applications use Redis, you need to locate the ThingsBoard database and flush only that. The default database index is 0, configurable with REDIS_DB ThingsBoard environment value.

redis-cli

select 0

flushdb

1
sudo service thingsboard start