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.
Before upgrading
Section titled “Before upgrading”- Record the current Apex version with
apex version. - Back up the Deployment YAML,
<apex_home>/config.yaml, product data, and logs or reports that must be retained. - Confirm the new release supports the target OS, architecture, deployment profile, and component versions.
- Check free disk space, service state, and ports; schedule a maintenance window for production.
- Keep the current Deployment file and confirm its
spec.apexDirpoints 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.
Upgrade Apex
Section titled “Upgrade Apex”For a Linux/macOS script installation, use the current release installer and target version. For example:
curl -fsSL https://downloads.tdengine.com/apex/latest/install.sh | bash -s -- -m apexOn 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.
Upgrade the TDengine deployment
Section titled “Upgrade the TDengine deployment”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:
apex validate -f deployment.yaml --manifests ~/.apex/manifests -o resolved.yamlapex prepare -f resolved.yaml --manifests ~/.apex/manifestsapex apply -f resolved.yaml --manifests ~/.apex/manifests --dry-runapex apply -f resolved.yaml --manifests ~/.apex/manifestsReview 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.
Migration checks for older deployments
Section titled “Migration checks for older deployments”- Target directories: New default Apex Home locations are
~/.apexon Linux/macOS andC:\ProgramData\TDengine\Apexon Windows. Changing controller Apex Home does not migrate old target directories. Reviewspec.apexDirand verify existing data. - Local transport: Use
transport: localfor a single-node local deployment; do not rely on loopback SSH to simulate local execution. - Resolved versions: Resolve dynamic versions with
validateand 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
-ffile. - Docker persistence: Compare the new
.env.exampleand merge settings while retaining the existing.envand 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.yamlor commit credentials to version control.
Cleanup boundaries
Section titled “Cleanup boundaries”| 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.