Skip to content

Upgrade and migration

This page describes a safe sequence for upgrading Apex and migrating older deployment configurations. Upgrading Apex, upgrading TDengine components, and running apex clean are different operations. Decide what is being upgraded before acting; cleaning a working directory is not a product upgrade or uninstall.

  1. Record the current Apex version with apex version.
  2. Back up the Deployment YAML, <apex_home>/config.yaml, product data, and logs or reports that must be retained.
  3. Confirm the new release supports the target OS, architecture, deployment profile, and component versions.
  4. Check free disk space, service state, and ports; schedule a maintenance window for production.
  5. Keep the current Deployment file and confirm its spec.apexDir points to the intended target directory.

Do not delete Apex Home before upgrading. An installer may preserve existing configuration and write new defaults that need review to config.yaml.new. Compare and merge manually; do not overwrite the existing configuration blindly.

For a Linux/macOS script installation, use the current release installer and target version. For example:

Terminal window
curl -fsSL https://downloads.tdengine.com/apex/latest/install.sh | bash -s -- -m apex

On Windows, use TDengineSetup to update a Host installation, or use the standalone installer as directed by the release. Docker users should rerun the Docker-mode installer to sync deployment assets for the Apex release. Installer options vary by platform; verify the help and release instructions before running.

Upgrading the Apex CLI does not automatically select new component versions. For a controlled upgrade, edit the component version or release in the Deployment, run validate, save the resolved Deployment, then prepare and apply:

Terminal window
apex validate -f deployment.yaml --manifests ~/.apex/manifests -o resolved.yaml
apex prepare -f resolved.yaml --manifests ~/.apex/manifests
apex apply -f resolved.yaml --manifests ~/.apex/manifests --dry-run
apex apply -f resolved.yaml --manifests ~/.apex/manifests

Review target nodes, components, versions, directories, and commands in the dry run before applying. For rollback, use the previously saved Deployment and matching artifacts; do not assume downgrades are safe or automatically restore data formats.

  • Target directories: New default Apex Home locations are ~/.apex on Linux/macOS and C:\ProgramData\TDengine\Apex on Windows. Changing controller Apex Home does not migrate old target directories. Review spec.apexDir and verify existing data.
  • Local transport: Use transport: local for a single-node local deployment; do not rely on loopback SSH to simulate local execution.
  • Resolved versions: Resolve dynamic versions with validate and reuse the same resolved file in later stages.
  • Package context: Package commands can use the Default Deployment saved after a successful full deployment. After a failed or partial deployment, provide an explicit -f file.
  • Docker persistence: Compare the new .env.example and merge settings while retaining the existing .env and persistent volumes. Do not delete data volumes as part of an upgrade.
  • Configuration and secrets: Do not store plain-text passwords, private keys, or tokens in config.yaml or commit credentials to version control.
Operation Main effect
Apex installer upgrade Updates Apex and related installer assets; normally preserves Apex Home configuration
apex clean Deletes the target Apex working directory and process files; does not uninstall components
Component uninstall Runs product uninstallers; data behavior depends on the product
Component purge Removes component programs, data, configuration, and logs; destructive

Before deleting or overwriting anything, verify the path, preserve required data, and validate backups. See Component management and Logs.