- Prepare for upgrading ThingsBoard Edge
- Upgrading Edge PE to 3.4.3
- Upgrading Edge PE to 3.4.1
- Upgrading Edge PE to 3.4.0
Prepare for upgrading ThingsBoard Edge
Back up your ThingsBoard Edge data before upgrading.
Stop the Edge container
Navigate to your docker-compose.yml directory and stop the container:
1
docker compose stop
Backup the database volume
Before upgrading, make a backup copy of the database volume:
1
docker run --rm -v tb-edge-postgres-data:/source -v tb-edge-postgres-data-backup:/backup busybox sh -c "cp -a /source/. /backup"
This copies all contents from tb-edge-postgres-data to tb-edge-postgres-data-backup.
Restore the backup (if needed)
Stop the ThingsBoard Edge container (if it’s still running):
1
docker compose stop
To restore data from a backup volume to the main volume, run the following command:
1
docker run --rm -v tb-edge-postgres-data-backup:/source -v tb-edge-postgres-data:/target busybox sh -c "cp -a /source/. /target"
Start the ThingsBoard Edge container:
1
docker compose up -d
Upgrading Edge PE to 3.4.3
Execute the following command to pull 3.4.3EDGEPE image:
1
docker pull thingsboard/tb-edge-pe:3.4.3EDGEPE
Set the terminal in the directory which contains the “docker-compose.yml” file, and run the following command to stop and remove the currently running TB Edge container (if it’s still running):
1
docker compose stop && docker compose rm mytbedge -f
The next step creates a docker compose file for the ThingsBoard Edge upgrade process and runs the upgrade. Once the upgrade process is successfully completed, the TB Edge upgrade container is automatically stopped:
Modify the main docker compose file (docker-compose.yml) for ThingsBoard Edge and update the image version:
1
sed -i 's|thingsboard/tb-edge-pe:3.4.1EDGEPE|thingsboard/tb-edge-pe:3.4.3EDGEPE|' docker-compose.yml
To start this docker compose , run the following command:
1
docker compose up -d && docker compose logs -f mytbedge
Upgrading Edge PE to 3.4.1
Execute the following command to pull 3.4.1EDGEPE image:
1
docker pull thingsboard/tb-edge-pe:3.4.1EDGEPE
Set the terminal in the directory which contains the “docker-compose.yml” file, and run the following command to stop and remove the currently running TB Edge container (if it’s still running):
1
docker compose stop && docker compose rm mytbedge -f
The next step creates a docker compose file for the ThingsBoard Edge upgrade process and runs the upgrade. Once the upgrade process is successfully completed, the TB Edge upgrade container is automatically stopped:
Modify the main docker compose file (docker-compose.yml) for ThingsBoard Edge and update the image version:
sed -i 's|thingsboard/tb-edge-pe:3.4.0EDGEPE|thingsboard/tb-edge-pe:3.4.1EDGEPE|' docker-compose.yml
To start this docker compose , run the following command:
1
docker compose up -d && docker compose logs -f mytbedge
Upgrading Edge PE to 3.4.0
Execute the following command to pull 3.4.0EDGEPE image:
1
docker pull thingsboard/tb-edge-pe:3.4.0EDGEPE
Set the terminal in the directory which contains the “docker-compose.yml” file, and run the following command to stop and remove the currently running TB Edge container (if it’s still running):
1
docker compose stop && docker compose rm mytbedge -f
The next step creates a docker compose file for the ThingsBoard Edge upgrade process and runs the upgrade. Once the upgrade process is successfully completed, the TB Edge upgrade container is automatically stopped:
Modify the main docker compose file (docker-compose.yml) for ThingsBoard Edge and update the image version:
1
sed -i 's|thingsboard/tb-edge-pe:3.3.4.1EDGEPE|thingsboard/tb-edge-pe:3.4.0EDGEPE|' docker-compose.yml
To start this docker compose , run the following command:
1
docker compose up -d && docker compose logs -f mytbedge