ThingsBoard PE Ubuntu 3.6.x Upgrade Instructions
Prepare for upgrading ThingsBoard
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 thingsboardsudo systemctl status thingsboardBackup 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 postgresqlMake 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.bakCheck backup file being created.
Cassandra
Check Cassandra status. It is necessary to stop Cassandra for the backup.
sudo systemctl status cassandraFlush all memtables from the node to SSTables on disk:
nodetool drainStop Cassandra:
sudo systemctl stop cassandraCheck the status again to ensure it is stopped:
sudo systemctl status cassandraMake sure you have enough space to place a backup of the database
Check database size:
du -h /var/lib/cassandra/ | tail -1Check free space:
df -h /Make a backup of Cassandra database:
mkdir backupsudo tar -cvf backup/cassandra.tar /var/lib/cassandraCheck archive being created.
Start Database
Cassandra:
sudo systemctl start cassandraPostgreSQL: Do nothing, PostgreSQL is already running.
Upgrading ThingsBoard PE to 3.6.4
ThingsBoard PE package download
wget https://dist.thingsboard.io/thingsboard-3.6.4pe.debThingsBoard PE service upgrade
- Stop ThingsBoard service if it is running.
sudo service thingsboard stop- Install ThingsBoard Web Report component as described in the installation guide. Do not forget to change the version according to your ThingsBoard version.
sudo dpkg -i thingsboard-3.6.4pe.debsudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.6.3Start the service
sudo service thingsboard startUpgrading ThingsBoard PE to 3.6.3
ThingsBoard PE package download
wget https://dist.thingsboard.io/thingsboard-3.6.3pe.debThingsBoard PE service upgrade
- Stop ThingsBoard service if it is running.
sudo service thingsboard stop- Install ThingsBoard Web Report component as described in the installation guide. Do not forget to change the version according to your ThingsBoard version.
sudo dpkg -i thingsboard-3.6.3pe.debsudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.6.2Start the service
sudo service thingsboard startUpgrading ThingsBoard PE to 3.6.2
ThingsBoard PE package download
wget https://dist.thingsboard.io/thingsboard-3.6.2pe.debThingsBoard PE service upgrade
- Stop ThingsBoard service if it is running.
sudo service thingsboard stop- Install ThingsBoard Web Report component as described in the installation guide. Do not forget to change the version according to your ThingsBoard version.
sudo dpkg -i thingsboard-3.6.2pe.debsudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.6.1Start the service
sudo service thingsboard startUpgrading ThingsBoard PE to 3.6.1
ThingsBoard PE package download
wget https://dist.thingsboard.io/thingsboard-3.6.1pe.debThingsBoard PE service upgrade
- Stop ThingsBoard service if it is running.
sudo service thingsboard stop- Install ThingsBoard Web Report component as described in the installation guide. Do not forget to change the version according to your ThingsBoard version.
sudo dpkg -i thingsboard-3.6.1pe.debsudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.6.0Start the service
sudo service thingsboard startUpgrading ThingsBoard PE to 3.6
ThingsBoard PE package download
wget https://dist.thingsboard.io/thingsboard-3.6pe.debThingsBoard PE service upgrade
- Stop ThingsBoard service if it is running.
sudo service thingsboard stop- Install ThingsBoard Web Report component as described in the installation guide. Do not forget to change the version according to your ThingsBoard version.
sudo dpkg -i thingsboard-3.6pe.debsudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.5.1Start the service
sudo service thingsboard start