目录
-
升级说明
- ThingsBoard PE v3.0.x upgrade instructions for Windows
ThingsBoard PE v3.0.x upgrade instructions for Windows
Upgrading ThingsBoard PE to 3.0.1
NOTE: These upgrade steps are applicable for ThingsBoard version 3.0PE. In order to upgrade to 3.0.1PE you need to upgrade to 3.0PE first.
升级至 ThingsBoard 3.0 前的重要提示
- ThingsBoard UI 已从 AngularJS 1.5.8 重写为 Angular 9。
- 这意味着什么?
- 概括而言,意味着:现代化应用、更易开发前端元素、性能提升以及 UI 定制更灵活。
- 如何升级?
- 若您不在仪表盘中使用自定义部件或自定义操作,可安全升级。
- 新的 JS 框架可能不完全支持您当前的代码(自定义部件和自定义操作),需稍作重构。因此建议您使用我们的云环境或开发实例测试您的定制内容。
- 从纯 Cassandra 迁移至混合数据库方案
- 我们仍支持 Cassandra 存储遥测数据,但不再用于存储设备、客户、租户等实体。
- 这意味着什么?
- 这将简化维护和未来改进,并将在 v3.1 中支持高级搜索能力。
- 如何升级?
- 若您使用纯 PostgreSQL 或 PostgreSQL(实体)+ Cassandra(遥测),则不受影响。
- 若您使用纯 Cassandra,升级过程将自动执行但需一定时间。停机时间取决于设备、属性、告警和关系的数量。 若上述实体少于 1000 万,升级通常仅需数分钟,具体取决于数据库性能。
Since ThingsBoard 3.0PE only PostgreSQL database is supported for entities data
- If you are using Cassandra database for entities data please install PostgreSQL database before proceeding upgrade procedure using the following guide:
ThingsBoard PE package download
Download ThingsBoard PE installation package for Windows: thingsboard-windows-setup-3.0.1pe.exe.
ThingsBoard PE service upgrade
- Stop ThingsBoard service if it is running.
- Make a backup of previous ThingsBoard PE configuration located in <ThingsBoard install dir>\conf (for ex. C:\thingsboard\conf).
- Run installation package thingsboard-windows-setup-3.0.1pe.exe.
- Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones.
- Please make sure that you set database.ts.type parameter value (in the file <ThingsBoard install dir>\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)
|
- Finally, run upgrade.bat script to upgrade ThingsBoard to the new version.
NOTE Scripts listed above should be executed using Administrator Role.
NOTE: If you were using Cassandra database for entities data execute the following migration script:
1
| C:\thingsboard>upgrade.bat --fromVersion=2.5.0PE-cassandra
|
Otherwise execute regular upgrade script:
1
| C:\thingsboard>upgrade.bat --fromVersion=2.5.0
|
Start the service
若将 Redis 用于缓存,在启动 ThingsBoard 前需清空所有已存储的 key。
连接到您的 Redis 实例(或 container/pod,视部署方式而定),执行:
redis-cli flushall
注意:仅当 Redis 专门用于 ThingsBoard 时可使用此命令。若其他应用也使用 Redis,需定位 ThingsBoard 使用的数据库并仅清空该库。默认数据库 index 为 0,可通过 ThingsBoard 环境变量 REDIS_DB 配置。
redis-cli
select 0
flushdb
Upgrading ThingsBoard PE to 3.0
Since ThingsBoard 3.0PE only PostgreSQL database is supported for entities data
- If you are using Cassandra database for entities data please install PostgreSQL database before proceeding upgrade procedure using the following guide:
ThingsBoard PE package download
Download ThingsBoard PE installation package for Windows: thingsboard-windows-setup-3.0pe.exe.
ThingsBoard PE service upgrade
- Stop ThingsBoard service if it is running.
- Make a backup of previous ThingsBoard PE configuration located in <ThingsBoard install dir>\conf (for ex. C:\thingsboard\conf).
- Run installation package thingsboard-windows-setup-3.0pe.exe.
- Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones.
- Please make sure that you set database.ts.type parameter value (in the file <ThingsBoard install dir>\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)
|
- Finally, run upgrade.bat script to upgrade ThingsBoard to the new version.
NOTE Scripts listed above should be executed using Administrator Role.
NOTE: If you were using Cassandra database for entities data execute the following migration script:
1
| C:\thingsboard>upgrade.bat --fromVersion=2.5.0PE-cassandra
|
Otherwise execute regular upgrade script:
1
| C:\thingsboard>upgrade.bat --fromVersion=2.5.0
|
Start the service
下一步
-
快速入门指南 - 快速了解ThingsBoard主要功能,约15-30分钟完成。
-
连接设备 - 根据连接技术或方案学习如何连接设备。
-
数据可视化 - 配置ThingsBoard复杂仪表盘的说明。
-
数据处理与操作 - 学习使用ThingsBoard规则引擎。
-
IoT数据分析 - 学习使用规则引擎执行基本分析任务。
-
高级功能 - 了解ThingsBoard高级功能。
-
贡献与开发 - 了解ThingsBoard贡献与开发。