Skip to content

Upgrade Guide ​

Page Guide ​

Use CasesFor upgrading from an old version to a new version, or replacing the backend, frontend, and database scripts during commercial-edition delivery.
PrerequisitesYou have confirmed the current version, target version, upgrade SQL, deployment method, and rollback window.
Upgrade ScopeDatabase, backend jar, frontend static assets, mobile app, visualization, cache, time-series database, and license configuration.
Acceptance CriteriaServices start normally, core business links are available, no data is lost, and version features take effect as expected.

1. Pre-Upgrade Preparation ​

Preparation ItemNotes
Confirm versionsRecord the current version and target version
Back up databasesMySQL, time-series database, OSS files, configuration files
Back up deployment packagesBackend jar, frontend directory, docker-compose, Nginx configuration
Read the changesCheck the release notes and SQL upgrade scripts
Test rehearsalRehearse the complete upgrade in a test environment first
Rollback planDefine the rollback package, database backup, and downtime window

2. Upgrade Order ​

3. SQL Scripts ​

SQL is located in the source repository:

text
springboot/sql

Common script types:

TypeNotes
Major-version initialization scriptUsed for new deployments, such as fastbee-v2.9.0.sql
Version upgrade scriptUsed to upgrade from an old version to a new version, such as fastbee2.8.0-upgrade-v2.9.0.sql
Multi-database scriptsDameng, KingbaseES, Oracle, Postgres, SQL Server
Time-series database scriptsIoTDB, TDengine initialization
AI initialization scriptAI tables and initialization data

警告

Upgrade SQL must be executed in version order; do not skip scripts across versions. Back up the database before execution.

4. Docker Deployment Upgrade ​

Common paths:

FileLocation
Backend jar/var/data/java/
Frontend assets/var/data/nginx/vue/
Visualization assets/var/data/nginx/view/
Nginx configuration/var/data/nginx/ or the deployment package configuration directory

Restart the services after replacement:

shell
cd /var/data
docker-compose restart java
docker-compose restart nginx

5. Cache And Time-Series Database ​

Some version upgrades involve cache structures, device data permissions, or time-series database super-table changes. Handle them according to the release notes:

ScenarioRecommendation
Device message cache changesClear the corresponding business keys in Redis
Modbus configuration changesClear Modbus-related caches
Thing model structure changesRestart the service and verify device models
TDengine table structure changesHandle super tables and historical data according to the release notes
IoTDB initializationConfirm the scripts and connection configuration

6. Post-Upgrade Acceptance ​

Acceptance ItemNormal Behavior
LoginAdministrators can log in and menus are normal
Products and devicesProducts, devices, and thing models can be queried
Device accessMQTTX can go online, report, and receive commands
Data centerHistorical data and reports can be queried
Rules and alertsRules, scenes, and alerts can be triggered
Notifications and work ordersNotification delivery and work order generation are normal
VideoLive streaming, channels, and recording are available as needed
AIModels, knowledge base, and conversations are available as needed

7. Rollback Strategy ​

If the upgrade fails:

  1. Stop the new-version services.
  2. Restore the old jar and frontend directory.
  3. Restore the database backup.
  4. Restore the Nginx and configuration files.
  5. Start the old-version services.
  6. Re-analyze the upgrade problem.

FastBee | fastbee.cn