This guide describes how to upgrade ThingsBoard Professional Edition from AWS Marketplace.
- Upgrading to ThingsBoard PE v.2.0.2
- Upgrading to ThingsBoard PE v.2.1.0
- Upgrading to ThingsBoard PE v.2.1.3
- Upgrading to ThingsBoard PE v.2.2.0
- Upgrading to ThingsBoard PE v.2.2.1
- Upgrading to ThingsBoard PE v.2.3.0
- Upgrading to ThingsBoard PE v.2.3.1
Upgrading to ThingsBoard PE v.2.0.2
These steps are applicable for ThingsBoard PE with Cassandra v.1.4.
Important note Please note that during upgrade procedure old rules and plugins will be completely removed from your ThingsBoard instance. Old rules and plugins functionality is replaced by new rule engine components (rule chains and rule nodes). If you have configured rules or plugins you need to backup them using export function before performing upgrade. After upgrade you will need to configure new rule chains in order to restore your application logic performed by old rules/plugins. Please refer to new rule engine documentation for details. |
Connect to your ThingsBoard PE v.1.4 instance over SSH.
Below is example command as a reference:
1
$ ssh -i <PRIVATE-KEY> ubuntu@<PUBLIC_DNS_NAME>
or goto EC2 instances and locate your ThingsBoard PE v1.4 instance. Then select Actions -> Connect and follow instructions provided in Connect To Your Instance dialog.
Upgrade ThingsBoard PE package
In the console execute the following command:
1
$ sudo tb-update-pkg.sh
The output should be like:
1
2
3
4
5
6
Updating ThingsBoard Professional Edition...
Installing ThingsBoard PE package...
(Reading database ... 104150 files and directories currently installed.)
Preparing to unpack /tmp/tb.deb ...
Unpacking thingsboard (2.0.2PE-1) over (1.4.0PE-1) ...
Setting up thingsboard (2.0.2PE-1) ...
NOTE: Package installer will ask you to merge your thingsboard.conf configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.conf (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
NOTE: Package installer will ask you to merge your thingsboard.yml configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.yml (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
After installation your previous configuration will be stored in the following files:
1
2
/usr/share/thingsboard/conf/thingsboard.conf.dpkg-old
/usr/share/thingsboard/conf/thingsboard.yml.dpkg-old
If you changed configuration files previously you can compare new configuration with the old one in order to restore your configuration values.
At least the following configuration parameters should be restored:
- edit /usr/share/thingsboard/conf/thingsboard.conf, for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.conf
- locate and replace
-Dplatform=deb
with-Dplatform=ami-pe-cassandra
. The final line should be the following:
1
2
3
...
export JAVA_OPTS="$JAVA_OPTS -Dplatform=ami-pe-cassandra -Dinstall.data_dir=/usr/share/thingsboard/data"
...
- edit /usr/share/thingsboard/conf/thingsboard.yml. for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.yml
- locate the following lines:
1
2
database:
type: "${DATABASE_TYPE:sql}" # cassandra OR sql
- change
database.type
value fromsql
tocassandra
:
1
2
database:
type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql
Upgrade Database
Execute database upgrade using the following command:
1
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=1.4.0
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
===================================================
:: ThingsBoard Professional Edition :: (v2.0.2PE)
===================================================
Starting ThingsBoard Upgrade from version 1.4.0 ...
Upgrading ThingsBoard from version 1.4.0 to 2.0.0 ...
Updating schema ...
Schema updated.
Updating data from version 1.4.0 to 2.0.0 ...
Updating system data...
Upgrading ThingsBoard from version 2.0.0 to 2.0.0PE ...
Updating schema ...
Schema updated.
Updating converters ...
Converters updated.
Updating data from version 2.0.0 to 2.0.0PE ...
Upgrade finished successfully!
ThingsBoard upgraded successfully!
In case of any failures during database upgrade Please contact support@thingsboard.io.
Start ThingsBoard PE service
Execute the following command in order to start ThingsBoard service:
1
$ sudo service thingsboard start
You can issue the following command in order to check if there are any errors on the backend side:
1
$ cat /var/log/thingsboard/thingsboard.log | grep ERROR
Upgrading to ThingsBoard PE v.2.1.0
These steps are applicable for ThingsBoard PE with Cassandra v.2.0.2.
Connect to your ThingsBoard PE v.2.0.2 instance over SSH.
Below is example command as a reference:
1
$ ssh -i <PRIVATE-KEY> ubuntu@<PUBLIC_DNS_NAME>
or goto EC2 instances and locate your ThingsBoard PE v2.0.2 instance. Then select Actions -> Connect and follow instructions provided in Connect To Your Instance dialog.
Upgrade ThingsBoard PE package
In the console execute the following command:
1
$ sudo tb-update-pkg.sh
The output should be like:
1
2
3
4
5
6
Updating ThingsBoard Professional Edition...
Installing ThingsBoard PE package...
(Reading database ... 104150 files and directories currently installed.)
Preparing to unpack /tmp/tb.deb ...
Unpacking thingsboard (2.1.0PE-1) over (2.0.2PE-1) ...
Setting up thingsboard (2.1.0PE-1) ...
NOTE: Package installer will ask you to merge your thingsboard.conf configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.conf (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
NOTE: Package installer will ask you to merge your thingsboard.yml configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.yml (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
After installation your previous configuration will be stored in the following files:
1
2
/usr/share/thingsboard/conf/thingsboard.conf.dpkg-old
/usr/share/thingsboard/conf/thingsboard.yml.dpkg-old
If you changed configuration files previously you can compare new configuration with the old one in order to restore your configuration values.
At least the following configuration parameters should be restored:
- edit /usr/share/thingsboard/conf/thingsboard.conf, for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.conf
- locate and replace
-Dplatform=deb
with-Dplatform=ami-pe-cassandra
. The final line should be the following:
1
2
3
...
export JAVA_OPTS="$JAVA_OPTS -Dplatform=ami-pe-cassandra -Dinstall.data_dir=/usr/share/thingsboard/data"
...
- edit /usr/share/thingsboard/conf/thingsboard.yml. for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.yml
- locate the following lines:
1
2
database:
type: "${DATABASE_TYPE:sql}" # cassandra OR sql
- change
database.type
value fromsql
tocassandra
:
1
2
database:
type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql
Upgrade Database
Execute database upgrade using the following command:
1
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.0.0
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
===================================================
:: ThingsBoard Professional Edition :: (v2.1.0PE)
===================================================
Starting ThingsBoard Upgrade from version 2.0.0 ...
Upgrading ThingsBoard from version 2.0.0 to 2.1.0PE ...
Updating schema ...
Schema updated.
Updating converters ...
Converters updated.
Updating data from version 2.0.0 to 2.1.0PE ...
Upgrade finished successfully!
ThingsBoard upgraded successfully!
In case of any failures during database upgrade Please contact support@thingsboard.io.
Start ThingsBoard PE service
Execute the following command in order to start ThingsBoard service:
1
$ sudo service thingsboard start
You can issue the following command in order to check if there are any errors on the backend side:
1
$ cat /var/log/thingsboard/thingsboard.log | grep ERROR
Install ThingsBoard Web Report Server
Execute the following command in order to install Report Server prerequisites:
1
2
3
4
5
sudo apt install -yq libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libnss3 lsb-release xdg-utils unzip wget libgbm-dev
Download ThingsBoard Web Report Server installation script:
1
2
3
$ cd ~
$ wget --quiet -O tb-install-web-report.sh https://thingsboard.io/docs/user-guide/install/resources/tb-install-web-report.sh
$ chmod +x tb-install-web-report.sh
Execute installation script:
1
$ sudo ./tb-install-web-report.sh
The output should be like:
1
2
3
4
5
6
7
8
9
10
Installing ThingsBoard Web Report Server...
Installing ThingsBoard Web Report Server package...
Selecting previously unselected package tb-web-report.
(Reading database ... 145356 files and directories currently installed.)
Preparing to unpack /tmp/tb-web-report.deb ...
Unpacking tb-web-report (2.1.0PE-1) ...
Setting up tb-web-report (2.1.0PE-1) ...
Processing triggers for systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Latest version of ThingsBoard Web Report Server has been installed.
Start ThingsBoard Web Report Server
Execute the following command in order to start ThingsBoard Web Report Server:
1
$ sudo service tb-web-report start
Upgrading to ThingsBoard PE v.2.1.3
These steps are applicable for ThingsBoard PE with Cassandra v.2.1.0.
Connect to your ThingsBoard PE v.2.1.0 instance over SSH.
Below is example command as a reference:
1
$ ssh -i <PRIVATE-KEY> ubuntu@<PUBLIC_DNS_NAME>
or goto EC2 instances and locate your ThingsBoard PE v2.1.0 instance. Then select Actions -> Connect and follow instructions provided in Connect To Your Instance dialog.
Upgrade ThingsBoard PE package
In the console execute the following command:
1
$ sudo tb-update-pkg.sh
The output should be like:
1
2
3
4
5
6
Updating ThingsBoard Professional Edition...
Installing ThingsBoard PE package...
(Reading database ... 104150 files and directories currently installed.)
Preparing to unpack /tmp/tb.deb ...
Unpacking thingsboard (2.1.3PE-1) over (2.1.0PE-1) ...
Setting up thingsboard (2.1.3PE-1) ...
NOTE: Package installer will ask you to merge your thingsboard.conf configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.conf (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
NOTE: Package installer will ask you to merge your thingsboard.yml configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.yml (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
After installation your previous configuration will be stored in the following files:
1
2
/usr/share/thingsboard/conf/thingsboard.conf.dpkg-old
/usr/share/thingsboard/conf/thingsboard.yml.dpkg-old
If you changed configuration files previously you can compare new configuration with the old one in order to restore your configuration values.
At least the following configuration parameters should be restored:
- edit /usr/share/thingsboard/conf/thingsboard.conf, for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.conf
- locate and replace
-Dplatform=deb
with-Dplatform=ami-pe-cassandra
. The final line should be the following:
1
2
3
...
export JAVA_OPTS="$JAVA_OPTS -Dplatform=ami-pe-cassandra -Dinstall.data_dir=/usr/share/thingsboard/data"
...
- edit /usr/share/thingsboard/conf/thingsboard.yml. for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.yml
- locate the following lines:
1
2
3
4
5
database:
entities:
type: "${DATABASE_ENTITIES_TYPE:sql}" # cassandra OR sql
ts:
type: "${DATABASE_TS_TYPE:sql}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
- change
database.entities.type
anddatabase.ts.type
values fromsql
tocassandra
:
1
2
3
4
5
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)
Upgrade Database
Execute database upgrade using the following command:
1
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.0.0
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
===================================================
:: ThingsBoard Professional Edition :: (v2.1.3PE)
===================================================
Starting ThingsBoard Upgrade from version 2.0.0 ...
Upgrading ThingsBoard from version 2.0.0 to 2.1.1 ...
Updating schema ...
Schema updated.
Upgrading ThingsBoard from version 2.1.1 to 2.1.2 ...
Upgrading Cassandra DataBase from version 2.1.1 to 2.1.2 ...
Dumping entity views ...
Entity views dumped.
Updating schema ...
Schema updated.
Restoring entity views ...
Entity views restored.
Upgrading ThingsBoard from version 2.1.2 to 2.1.3PE ...
Updating schema ...
Schema updated.
Updating converters ...
Converters updated.
Updating data from version 2.1.2 to 2.1.3PE ...
Updating system data...
Upgrade finished successfully!
ThingsBoard upgraded successfully!
In case of any failures during database upgrade Please contact support@thingsboard.io.
Start ThingsBoard PE service
Execute the following command in order to start ThingsBoard service:
1
$ sudo service thingsboard start
You can issue the following command in order to check if there are any errors on the backend side:
1
$ cat /var/log/thingsboard/thingsboard.log | grep ERROR
Upgrading to ThingsBoard PE v.2.2.0
These steps are applicable for ThingsBoard PE with Cassandra v.2.1.3.
Connect to your ThingsBoard PE v.2.1.3 instance over SSH.
Below is example command as a reference:
1
$ ssh -i <PRIVATE-KEY> ubuntu@<PUBLIC_DNS_NAME>
or goto EC2 instances and locate your ThingsBoard PE v2.1.3 instance. Then select Actions -> Connect and follow instructions provided in Connect To Your Instance dialog.
Upgrade ThingsBoard PE package
In the console execute the following command:
1
$ sudo tb-update-pkg.sh
The output should be like:
1
2
3
4
5
6
Updating ThingsBoard Professional Edition...
Installing ThingsBoard PE package...
(Reading database ... 196038 files and directories currently installed.)
Preparing to unpack thingsboard.deb ...
Unpacking thingsboard (2.2.0PE-1) over (2.1.3PE-1) ...
Setting up thingsboard (2.2.0PE-1) ...
NOTE: Package installer will ask you to merge your thingsboard.yml configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.yml (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
After installation your previous configuration will be stored in the following files:
1
/usr/share/thingsboard/conf/thingsboard.yml.dpkg-old
If you changed configuration files previously you can compare new configuration with the old one in order to restore your configuration values.
At least the following configuration parameters should be restored:
- edit /usr/share/thingsboard/conf/thingsboard.yml. for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.yml
- locate the following lines:
1
2
3
4
5
database:
entities:
type: "${DATABASE_ENTITIES_TYPE:sql}" # cassandra OR sql
ts:
type: "${DATABASE_TS_TYPE:sql}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
- change
database.entities.type
anddatabase.ts.type
values fromsql
tocassandra
:
1
2
3
4
5
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)
Upgrade Database
Execute database upgrade using the following command:
1
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.0.0
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
===================================================
:: ThingsBoard Professional Edition :: (v2.2.0PE)
===================================================
Starting ThingsBoard Upgrade from version 2.0.0 ...
Upgrading ThingsBoard from version 2.0.0 to 2.1.1 ...
Updating schema ...
Schema updated.
Upgrading ThingsBoard from version 2.1.1 to 2.1.2 ...
Upgrading Cassandra DataBase from version 2.1.1 to 2.1.2 ...
Dumping entity views ...
Entity views dumped.
Updating schema ...
Schema updated.
Restoring entity views ...
Entity views restored.
Upgrading ThingsBoard from version 2.1.3 to 2.2.0 ...
Upgrading ThingsBoard from version 2.2.0 to 2.2.0PE ...
Updating schema ...
Schema updated.
Updating converters ...
Converters updated.
Updating data from version 2.2.0 to 2.2.0PE ...
Updating system data...
Upgrade finished successfully!
ThingsBoard upgraded successfully!
In case of any failures during database upgrade Please contact support@thingsboard.io.
Start ThingsBoard PE service
Execute the following command in order to start ThingsBoard service:
1
$ sudo service thingsboard start
You can issue the following command in order to check if there are any errors on the backend side:
1
$ cat /var/log/thingsboard/thingsboard.log | grep ERROR
Upgrade ThingsBoard Web Report Server to v.2.2.0
Download ThingsBoard Web Report Server installation script:
1
2
3
$ cd ~
$ wget --quiet -O tb-install-web-report.sh https://thingsboard.io/docs/user-guide/install/resources/tb-install-web-report.sh
$ chmod +x tb-install-web-report.sh
Execute installation script:
1
$ sudo ./tb-install-web-report.sh
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
Installing ThingsBoard Web Report Server...
Installing ThingsBoard Web Report Server package...
(Reading database ... 196038 files and directories currently installed.)
Preparing to unpack tb-web-report.deb ...
Unpacking tb-web-report (2.2.0PE-1) over (2.1.0PE-1) ...
Setting up tb-web-report (2.2.0PE-1) ...
Installing new version of config file /usr/share/tb-web-report/conf/tb-web-report.conf ...
Installing new version of config file /usr/share/tb-web-report/conf/custom-environment-variables.yml ...
Installing new version of config file /usr/share/tb-web-report/conf/default.yml ...
Installing new version of config file /usr/share/tb-web-report/conf/logger.js ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Latest version of ThingsBoard Web Report Server has been installed.
Optional. Install Noto fonts (to support Japanese, Chinese. etc.)
This step is optional and needed is you want to support all languages (like Japanese, Chinese. etc.) for your reports.
Execute the following commands:
1
2
3
4
5
6
7
8
9
10
mkdir ~/noto
cd ~/noto
wget https://src.fedoraproject.org/repo/extras/chromium/NotoSansCJKjp-hinted.zip/sha512/e7bcbc53a10b8ec3679dcade5a8a94cea7e1f60875ab38f2193b4fa8e33968e1f0abc8184a3df1e5210f6f5c731f96c727c6aa8f519423a29707d2dee5ada193/NotoSansCJKjp-hinted.zip
unzip NotoSansCJKjp-hinted.zip
sudo mkdir -p /usr/share/fonts/noto
sudo cp *.otf /usr/share/fonts/noto
sudo chmod 655 -R /usr/share/fonts/noto/
sudo fc-cache -fv
cd ~
rm -rf ~/noto
Start ThingsBoard Web Report Server
Execute the following command in order to start ThingsBoard Web Report Server:
1
$ sudo service tb-web-report start
Upgrading to ThingsBoard PE v.2.2.1
These steps are applicable for ThingsBoard PE with Cassandra v.2.2.0.
Connect to your ThingsBoard PE v.2.2.0 instance over SSH.
Below is example command as a reference:
1
$ ssh -i <PRIVATE-KEY> ubuntu@<PUBLIC_DNS_NAME>
or goto EC2 instances and locate your ThingsBoard PE v2.2.0 instance. Then select Actions -> Connect and follow instructions provided in Connect To Your Instance dialog.
Upgrade ThingsBoard PE package
In the console execute the following command:
1
$ sudo tb-update-pkg.sh
The output should be like:
1
2
3
4
5
6
Updating ThingsBoard Professional Edition...
Installing ThingsBoard PE package...
(Reading database ... 221177 files and directories currently installed.)
Preparing to unpack thingsboard.deb ...
Unpacking thingsboard (2.2.1PE~RC-1) over (2.2.0PE-1) ...
Setting up thingsboard (2.2.1PE~RC-1) ...
NOTE: Package installer will ask you to merge your thingsboard.yml configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.yml (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
After installation your previous configuration will be stored in the following files:
1
/usr/share/thingsboard/conf/thingsboard.yml.dpkg-old
If you changed configuration files previously you can compare new configuration with the old one in order to restore your configuration values.
At least the following configuration parameters should be restored:
- edit /usr/share/thingsboard/conf/thingsboard.yml. for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.yml
- locate the following lines:
1
2
3
4
5
database:
entities:
type: "${DATABASE_ENTITIES_TYPE:sql}" # cassandra OR sql
ts:
type: "${DATABASE_TS_TYPE:sql}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
- change
database.entities.type
anddatabase.ts.type
values fromsql
tocassandra
:
1
2
3
4
5
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)
Start ThingsBoard PE service
Execute the following command in order to start ThingsBoard service:
1
$ sudo service thingsboard start
You can issue the following command in order to check if there are any errors on the backend side:
1
$ cat /var/log/thingsboard/thingsboard.log | grep ERROR
Upgrading to ThingsBoard PE v.2.3.0
These steps are applicable for the following ThingsBoard PE versions:
- ThingsBoard Professional Edition with Cassandra v.2.2.0PE
- ThingsBoard PE Maker v.2.2.1PEMK
- ThingsBoard PE Prototype v.2.2.1PEPT
- ThingsBoard PE Startup v.2.2.1PEST
- ThingsBoard PE Business v.2.2.1PEBS
- ThingsBoard PE Enterprise v.2.2.1PE
Connect to your ThingsBoard PE instance over SSH.
Below is example command as a reference:
1
$ ssh -i <PRIVATE-KEY> ubuntu@<PUBLIC_DNS_NAME>
or goto EC2 instances and locate your ThingsBoard PE instance. Then select Actions -> Connect and follow instructions provided in Connect To Your Instance dialog.
Upgrade ThingsBoard PE package
In the console execute the following command:
1
$ sudo tb-update-pkg.sh
The output should be like:
1
2
3
4
5
6
Updating ThingsBoard Professional Edition...
Installing ThingsBoard PE package...
(Reading database ... 221177 files and directories currently installed.)
Preparing to unpack thingsboard.deb ...
Unpacking thingsboard (2.3.0PE-1) over (2.2.1PE~RC-1) ...
Setting up thingsboard (2.3.0PE-1) ...
NOTE: Package installer may ask you to merge your thingsboard.conf configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.conf (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
NOTE: Package installer may ask you to merge your thingsboard.yml configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.yml (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
After installation your previous configuration will be stored in the following files:
1
2
/usr/share/thingsboard/conf/thingsboard.conf.dpkg-old
/usr/share/thingsboard/conf/thingsboard.yml.dpkg-old
If you changed configuration files previously you can compare new configuration with the old one in order to restore your configuration values.
At least the following configuration parameters should be restored:
- edit /usr/share/thingsboard/conf/thingsboard.conf, for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.conf
- locate and replace
-Dplatform=deb
with the following value:
For ThingsBoard Professional Edition with Cassandra or ThingsBoard PE Enterprise: -Dplatform=ami-pe-cassandra
For ThingsBoard PE Maker: -Dplatform=ami-pe-mk
For ThingsBoard PE Prototype: -Dplatform=ami-pe-pt
For ThingsBoard PE Startup: -Dplatform=ami-pe-st
For ThingsBoard PE Business: -Dplatform=ami-pe-bs
The final line should be like this (example for ThingsBoard Professional Edition with Cassandra):
1
2
3
...
export JAVA_OPTS="$JAVA_OPTS -Dplatform=ami-pe-cassandra -Dinstall.data_dir=/usr/share/thingsboard/data"
...
- edit /usr/share/thingsboard/conf/thingsboard.yml. for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.yml
For ThingsBoard PE Maker, ThingsBoard PE Prototype or ThingsBoard PE Startup:
Comment ‘# HSQLDB DAO Configuration’ block.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# HSQLDB DAO Configuration
#spring:
# data:
# jpa:
# repositories:
# enabled: "true"
# jpa:
# hibernate:
# ddl-auto: "validate"
# database-platform: "org.hibernate.dialect.HSQLDialect"
# datasource:
# driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.hsqldb.jdbc.JDBCDriver}"
# url: "${SPRING_DATASOURCE_URL:jdbc:hsqldb:file:${SQL_DATA_FOLDER:/tmp}/thingsboardDb;sql.enforce_size=false}"
# username: "${SPRING_DATASOURCE_USERNAME:sa}"
# password: "${SPRING_DATASOURCE_PASSWORD:}"
Uncomment ‘# PostgreSQL DAO Configuration’ block. Be sure to update the postgres databases username and password in the bottom two lines of the block (here, as shown, they are both “postgres”).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# PostgreSQL DAO Configuration
spring:
data:
jpa:
repositories:
enabled: "true"
jpa:
hibernate:
ddl-auto: "validate"
database-platform: "org.hibernate.dialect.PostgreSQLDialect"
datasource:
driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}"
url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}"
username: "${SPRING_DATASOURCE_USERNAME:postgres}"
password: "${SPRING_DATASOURCE_PASSWORD:postgres}"
For ThingsBoard Professional Edition with Cassandra, ThingsBoard PE Business or ThingsBoard PE Enterprise:
- locate the following lines:
1
2
3
4
5
database:
entities:
type: "${DATABASE_ENTITIES_TYPE:sql}" # cassandra OR sql
ts:
type: "${DATABASE_TS_TYPE:sql}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
and change database.entities.type
and database.ts.type
values from sql
to cassandra
:
1
2
3
4
5
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)
Upgrade Database
Execute database upgrade using the following command:
1
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.2.0
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
===================================================
:: ThingsBoard Professional Edition :: (v2.3.0PE)
===================================================
Starting ThingsBoard Upgrade from version 2.2.0 ...
Upgrading ThingsBoard from version 2.2.0 to 2.3.0PE ...
Updating schema ...
Schema updated.
Updating converters ...
Converters updated.
Updating data from version 2.2.0 to 2.3.0PE ...
Updating system data...
Upgrade finished successfully!
ThingsBoard upgraded successfully!
In case of any failures during database upgrade Please contact support@thingsboard.io.
Start ThingsBoard PE service
Execute the following command in order to start ThingsBoard service:
1
$ sudo service thingsboard start
You can issue the following command in order to check if there are any errors on the backend side:
1
$ cat /var/log/thingsboard/thingsboard.log | grep ERROR
Upgrading to ThingsBoard PE v.2.3.1
These steps are applicable for the following ThingsBoard PE versions:
- ThingsBoard Professional Edition with Cassandra v.2.2.0PE
- ThingsBoard PE Maker v.2.3.0PEMK
- ThingsBoard PE Prototype v.2.3.0PEPT
- ThingsBoard PE Startup v.2.3.0PEST
- ThingsBoard PE Business v.2.3.0PEBS
- ThingsBoard PE Enterprise v.2.3.0PE
Connect to your ThingsBoard PE instance over SSH.
Below is example command as a reference:
1
$ ssh -i <PRIVATE-KEY> ubuntu@<PUBLIC_DNS_NAME>
or goto EC2 instances and locate your ThingsBoard PE instance. Then select Actions -> Connect and follow instructions provided in Connect To Your Instance dialog.
Upgrade ThingsBoard PE package
In the console execute the following command:
1
$ sudo tb-update-pkg.sh
The output should be like:
1
2
3
4
5
6
Updating ThingsBoard Professional Edition...
Installing ThingsBoard PE package...
(Reading database ... 221177 files and directories currently installed.)
Preparing to unpack thingsboard.deb ...
Unpacking thingsboard (2.3.1PE-1) over (2.3.0PE-1) ...
Setting up thingsboard (2.3.1PE-1) ...
NOTE: Package installer may ask you to merge your thingsboard.conf configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.conf (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
NOTE: Package installer may ask you to merge your thingsboard.yml configuration.
1
2
3
4
5
6
7
8
9
10
Configuration file '/usr/share/thingsboard/conf/thingsboard.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** thingsboard.yml (Y/I/N/O/D/Z) [default=N] ? Y
Select install the package maintainer’s version by entering Y or I.
After installation your previous configuration will be stored in the following files:
1
2
/usr/share/thingsboard/conf/thingsboard.conf.dpkg-old
/usr/share/thingsboard/conf/thingsboard.yml.dpkg-old
If you changed configuration files previously you can compare new configuration with the old one in order to restore your configuration values.
At least the following configuration parameters should be restored:
- edit /usr/share/thingsboard/conf/thingsboard.conf, for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.conf
- locate and replace
-Dplatform=deb
with the following value:
For ThingsBoard Professional Edition with Cassandra or ThingsBoard PE Enterprise: -Dplatform=ami-pe-cassandra
For ThingsBoard PE Maker: -Dplatform=ami-pe-mk
For ThingsBoard PE Prototype: -Dplatform=ami-pe-pt
For ThingsBoard PE Startup: -Dplatform=ami-pe-st
For ThingsBoard PE Business: -Dplatform=ami-pe-bs
The final line should be like this (example for ThingsBoard Professional Edition with Cassandra):
1
2
3
...
export JAVA_OPTS="$JAVA_OPTS -Dplatform=ami-pe-cassandra -Dinstall.data_dir=/usr/share/thingsboard/data"
...
- edit /usr/share/thingsboard/conf/thingsboard.yml. for ex.:
1
$ sudo nano /usr/share/thingsboard/conf/thingsboard.yml
For ThingsBoard PE Maker, ThingsBoard PE Prototype or ThingsBoard PE Startup:
Comment ‘# HSQLDB DAO Configuration’ block.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# HSQLDB DAO Configuration
#spring:
# data:
# jpa:
# repositories:
# enabled: "true"
# jpa:
# hibernate:
# ddl-auto: "validate"
# database-platform: "org.hibernate.dialect.HSQLDialect"
# datasource:
# driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.hsqldb.jdbc.JDBCDriver}"
# url: "${SPRING_DATASOURCE_URL:jdbc:hsqldb:file:${SQL_DATA_FOLDER:/tmp}/thingsboardDb;sql.enforce_size=false}"
# username: "${SPRING_DATASOURCE_USERNAME:sa}"
# password: "${SPRING_DATASOURCE_PASSWORD:}"
Uncomment ‘# PostgreSQL DAO Configuration’ block. Be sure to update the postgres databases username and password in the bottom two lines of the block (here, as shown, they are both “postgres”).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# PostgreSQL DAO Configuration
spring:
data:
jpa:
repositories:
enabled: "true"
jpa:
hibernate:
ddl-auto: "validate"
database-platform: "org.hibernate.dialect.PostgreSQLDialect"
datasource:
driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}"
url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}"
username: "${SPRING_DATASOURCE_USERNAME:postgres}"
password: "${SPRING_DATASOURCE_PASSWORD:postgres}"
For ThingsBoard Professional Edition with Cassandra, ThingsBoard PE Business or ThingsBoard PE Enterprise:
- locate the following lines:
1
2
3
4
5
database:
entities:
type: "${DATABASE_ENTITIES_TYPE:sql}" # cassandra OR sql
ts:
type: "${DATABASE_TS_TYPE:sql}" # cassandra OR sql (for hybrid mode, only this value should be cassandra)
and change database.entities.type
and database.ts.type
values from sql
to cassandra
:
1
2
3
4
5
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)
Upgrade Database
Execute database upgrade using the following command:
1
$ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.3.0
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
===================================================
:: ThingsBoard Professional Edition :: (v2.3.1PE)
===================================================
Starting ThingsBoard Upgrade from version 2.3.0 ...
Upgrading ThingsBoard from version 2.3.0 to 2.3.1 ...
Upgrading ThingsBoard from version 2.3.1 to 2.3.1PE ...
Updating schema ...
Schema updated.
Updating converters ...
Converters updated.
Updating data from version 2.3.1 to 2.3.1PE ...
Updating system data...
Upgrade finished successfully!
ThingsBoard upgraded successfully!
In case of any failures during database upgrade Please contact support@thingsboard.io.
Start ThingsBoard PE service
Execute the following command in order to start ThingsBoard service:
1
$ sudo service thingsboard start
You can issue the following command in order to check if there are any errors on the backend side:
1
$ cat /var/log/thingsboard/thingsboard.log | grep ERROR
Upgrade ThingsBoard Web Report Server to v.2.3.1
Download ThingsBoard Web Report Server installation script:
1
2
3
$ cd ~
$ wget --quiet -O tb-install-web-report.sh https://thingsboard.io/docs/user-guide/install/resources/tb-install-web-report.sh
$ chmod +x tb-install-web-report.sh
Execute installation script:
1
$ sudo ./tb-install-web-report.sh
The output should be like:
1
2
3
4
5
6
7
8
9
10
11
12
13
Installing ThingsBoard Web Report Server...
Installing ThingsBoard Web Report Server package...
(Reading database ... 196038 files and directories currently installed.)
Preparing to unpack tb-web-report.deb ...
Unpacking tb-web-report (2.3.1PE-1) over (2.2.0PE-1) ...
Setting up tb-web-report (2.3.1PE-1) ...
Installing new version of config file /usr/share/tb-web-report/conf/tb-web-report.conf ...
Installing new version of config file /usr/share/tb-web-report/conf/custom-environment-variables.yml ...
Installing new version of config file /usr/share/tb-web-report/conf/default.yml ...
Installing new version of config file /usr/share/tb-web-report/conf/logger.js ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Latest version of ThingsBoard Web Report Server has been installed.
Start ThingsBoard Web Report Server
Execute the following command in order to start ThingsBoard Web Report Server:
1
$ sudo service tb-web-report start