Skip to main content

Upgrade, rollback, and verification

info

Upgrade, rollback, and verification follow preparation, maintenance, and verification, covering task exports, component updates, and post-rollback data checks. Upgrading from versions earlier than v3.4 does not automatically migrate old tasks. Rolling back programs and configuration does not undo data written during the upgrade.

Where to operate: task export and import in taosExplorer; installation and service management on hosts of components being upgraded; run SQL in the taosExplorer Data Browser or taos CLI.

Upgrade paths, plugins, and recovery state may differ by starting version. Confirm the corresponding release notes and compatibility requirements before execution. When upgrading to v3.4.4.2, check its Behavior changes and Before you upgrade sections. Confirm whether the delivered version includes these changes against its corresponding release notes.

1. Prepare before upgrading​

Record current taosd, taosAdapter, taosExplorer, taosX, taosX-Agent, and actual plugin versions. Save original installation packages, configuration, and deployment methods. Confirm component and server versions separately with taosx --version and SQL SELECT SERVER_VERSION();, not installation package names alone.

Prepare and check the following:

  • Required task exports, configuration, certificates, plugin dependencies, and service account information.
  • Database backups and a recovery plan; task exports do not contain business database data.
  • Source retention, unprocessed data scope, agent caches and execution-host recovery state, and disk space needed for maintenance.
  • Pre-upgrade source/target verification samples, real-time lag, and backlog baselines.
  • Downtime window, upgrade order, rollback triggers, and responsible personnel.

Exports and configuration may contain credentials and must be protected as sensitive materials. Do not save only redacted copies as recovery originals; redact external diagnostic copies separately.

1.1 Pre-upgrade go/no-go checks​

  1. Run taosx --version on the actual component host and SELECT SERVER_VERSION(); in the taosExplorer Data Browser or taos CLI. Record actual output and old installation package locations. A target-version declaration does not replace the deployed version.
  2. Run SHOW XNODES;, SHOW XNODE TASKS;, and SHOW XNODE JOBS;, plus SHOW XNODE AGENTS; when agents are used. Save task inventories and states for item-by-item comparison after upgrade.
  3. Export tasks using Daily operations, confirm files are readable and task counts correct, and save configuration and dependency inventories for each execution host.
  4. Select at least one real-time sample and historical boundary sample. Save source records and target queries, and retain throughput, failure, and lag baselines for the same window using Logs and performance.
  5. Begin only after confirming a verified database recovery path, source retention covering maintenance and catch-up, and clear rollback conditions and owners.
warning

Do not replace programs if the starting version is unknown, key recovery materials are missing, or compatibility is unconfirmed. Determine installation or downgrade commands, execution order, and compatible paths from the starting version, corresponding release notes, and deployment method.

For Linux systemd deployments, also save actual unit, ExecStart, service account, and PID information using Restarts, checkpoints, and store-and-forward. Check running programs and configuration paths. Default files are /etc/taos/taosx.toml and /etc/taos/agent.toml for the agent; use actual read locations if custom startup arguments exist. Recheck the same way after upgrade. taosx --version from PATH does not prove the service process uses that program. For containers, retain original image identifiers, mounts, and startup arguments, and maintain them using the original container deployment workflow, not host systemctl commands.

2. Migrate tasks from versions earlier than v3.4​

When upgrading from a version earlier than v3.4 to v3.4.x, old tasks do not automatically migrate to the new task management environment. Export while the old environment is still operational, then import and verify in the new one. Replacing programs and waiting for old tasks to appear is insufficient.

  1. Before upgrading, select tasks to migrate under Data In > Data In Tasks in taosExplorer, use Export Tasks, and save the JSON file.
  2. After upgrade, Xnode registration, and required agent and plugin preparation, use Import Tasks on the same task page, select the file, and confirm tasks to import.
  3. Imported tasks are in created state. Check sources/targets, execution locations, and dependencies, then explicitly start those that need to run.
  4. Check task counts, configuration, and actual target data individually, and confirm recovery of downtime-window data.

Importing tasks does not automatically inherit old consumer positions, agent caches, or connector recovery state on collection hosts. Confirm recovery scope per connector. If old tasks are invisible, do not clean old data directories first.

Custom Linux data_dir settings in older versions also have a version-specific SQLite file location change. Do not generalize it to v3.4.x operations. If this path is involved, check the starting version using the Legacy upgrade steps in the taosX component guide and retain original files.

2.1 Dedicated Migration for Legacy Dual-Active Tasks​

Legacy taosx replica dual-active tasks cannot use the ordinary task import procedure above. The v3.4.4.2 Before you upgrade section documents migrate_active_active.py. The script generates SQL-managed tasks from legacy v3.3.6 dual-active configurations. Obtain the script matching the target distribution and check its --help before use. For other starting versions, confirm script applicability separately.

By default, the script only generates migration files. It does not modify old tasks or create or start new ones. Review the generated configuration, both replication directions, task names, and synchronization starting points first. Migration files may contain credentials; protect them as secret files. VIA, custom parsers, parallel tasks, and auto.offset.reset=latest are not supported for automatic migration and require a manual rebuild plan.

While the old service remains accessible, old-task operations run only when explicitly requested with --stop-old, --delete-old, or --stop-delete-old. Deletion requires tasks to be stopped; associated automatic discovery settings for new databases are also disabled or removed. After completing the required old-task operations, stop the old taosX service before upgrading. Using --sqlite with a consistent backup only generates files offline; it cannot stop or delete old tasks. After upgrading, SQL is executed against the new management cluster only when --execute create, --execute start, or --execute all is explicitly specified. Automatic execution requires xnodeDsnProtection to be disabled. The script refuses writes if protection is enabled or its state cannot be confirmed; do not disable protection on your own to use the script.

For configurations the script cannot handle, record progress and stop old tasks before upgrading. Afterward, rebuild dedicated replica tasks on both sides as described in Disaster Recovery and Dual-Active Replication, setting msg.consume.start.ts according to confirmed data boundaries. Generated statements or successful task startup do not establish that original positions were inherited. Verify the historical range, new data, and overlap window before releasing the system for business use.

3. Handle tasks during maintenance​

First check target version combinations against the Compatibility matrix. taosX and every connected agent must use the same version. With Xnode DSN protection enabled, coordinate related management, Explorer, and execution components according to TLS, DSNs, and sensitive files. Do not replace only one executable.

Plan task interruptions for single-node deployments and confirm that source rereads or agent caches cover maintenance. Even with multiple nodes, confirm other nodes' capacity, networks, plugins, and required files before considering draining.

DRAIN XNODE reassigns existing tasks to other nodes. It does not automatically copy source files, certificates, or caches from the original execution node. See Xnode management for commands and permissions. Verify data from takeover tasks after draining.

Update components with packages and plugins matching the target version. Afterward, check actual versions, configuration read paths, service identities, Xnode and agent connections, then start or check original tasks. Do not assume every task recovers automatically or use RESTART XNODE instead of updating the service on the taosX host.

4. Upgrade verification checklist​

ScopePass condition
Versions and startupComponent versions match the upgrade plan and services have no persistent startup errors
Nodes and agentsExpected Xnodes are online and required agents and plugins are available
Task definitionsOriginal/imported task counts, sources/targets, mappings, and execution locations are correct
Real-time tasksSeveral consecutive source changes reach the target and lag meets business requirements
Historical and migration tasksObjects, time boundaries, counts, fields, and tags have all been checked
Downtime windowBackfilled data, duplicate scope, and remaining gaps are explicit
Runtime stabilityFailure, backlog, resource, and disk trends are acceptable and monitoring works

An accessible interface or started service is only part of the checks. End the maintenance window after data verification, and retain logs and version records from the observation period.

4.1 Perform verification in order​

  1. Check actual versions and startup logs on each component host. If versions are wrong or startup keeps failing, stop expanding the upgrade scope.
  2. Rerun pre-upgrade node and task queries and compare inventories for missing tasks, wrong agents, or unintended duplicate starts. Explicitly start imported tasks as needed.
  3. Repeat target queries for the same new source record and check actual tables, timestamps, values, and tags. Observe several consecutive changes for real-time tasks.
  4. Define the interruption window using the last pre-downtime position and post-recovery starting point. Check backfilled, duplicate, and unrecoverable ranges interval by interval using Restarts, checkpoints, and store-and-forward. For CSV folder-watch tasks, also check CSV Legacy Checkpoints and Rereads After an Upgrade.
  5. Compare pre/post-upgrade metrics under equivalent load. Restarts change counts or run starts; compare increments within each window, not two cumulative totals directly.

If verification finds an issue, record the step, task, record, and difference, then decide whether to roll back using preapproved conditions. Do not end maintenance merely because the upgrade command exited successfully.

5. Rollback conditions and steps​

Before rollback, confirm that the old version can read the metadata, configuration, and execution-host recovery state to restore, that old plugins and sources/targets remain compatible, and that a usable database recovery plan exists. In particular, metadata changes across v3.4 cannot be handled by merely replacing old binaries.

If a process is writing a backup chain, stop the original writer and preserve the chain and layout markers first. An old version that does not recognize task_dir layout cannot keep appending to the same task and root directory. Use a new task ID or backup root directory. See Data backup and restore for complete restrictions.

When rollback conditions are met, stop expanding changes and save post-upgrade errors and target data boundaries. Restore components, configuration, and necessary state under the previously verified plan. Before restarting, confirm no duplicate collection or writes with new tasks still running, then check maintenance-window and new data.

Rollback must at least define this order: stop tasks or components being rolled back and preserve the scene; confirm old-version compatibility with current state; restore programs, configuration, and necessary data using the verified plan; start only one set of tasks for the same source and target; repeat version, task, window-data, and new-sample verification. Rolling back programs and configuration does not undo data written during the upgrade. Determine database recovery and duplicate handling separately.

If old-state compatibility is unclear, recovery materials are missing, or unexplained data changes have occurred, preserve the scene and submit Diagnostic packages and support tickets. Establish the recovery path before operating. Apply the same data verification standards after rollback as after upgrade.