Updating Tracecat
Learn how to safely update versions and run data migrations.
Updates and data migrations can be tricky business. We’d love to help on Discord.
If you want to migrate secrets, please make sure to save your database
encryption / decryption Fernet key. You can find this key in your .env
file
assigned to the environment variable: TRACECAT__DB_ENCRYPTION_KEY
.
Docker Compose
Download latest environment variables migration script and template
Fetch the latest environment variables migration script env-migration.sh
and template .env.example
to ensure compatibility with the new Tracecat
version.
Execute environment variables migration
Run the environment variables migration script to update your existing
.env
file with any new or changed variables.
Update Docker Compose Configuration
Download the latest Docker Compose file.
Restart Tracecat
Run docker compose up
using the new Docker Compose and .env
files.
Update Integrations
Integrations are not automatically updated when you update the Tracecat version. You will need to manually sync the Tracecat registry repository from the Action Registry page:
Terraform Deployments
All of Tracecat’s Cloud deployments are configured using Terraform.
To update Tracecat, you can download the latest Terraform stack from Tracecat’s GitHub repo and run terraform apply
.
Data Migration
As of version 0.8.x, data migrations are automatically applied when the API service is spun up. Data migrations are, however, non-trivial operations. We recommend backing up your database before running migrations, especially in a production environment.
If the API service fails to spin up due to a data migration error, do not worry. Your data is still intact. Make sure you backup the core Tracecat database:
- For Docker Compose and AWS EC2 deployments, this would be the
core-db
volume in Tracecat’s Docker stack. - For AWS ECS Fargate deployments, backups are created automatically as part of the RDS postgres service. Just run
terraform apply
withvar.restore_from_backup
set totrue
to restore the latest RDS snapshot.
If you need live migration support, contact us on Discord or email founders@tracecat.com!