Back up, restore and update
Take a backup, prove it restores, and move to a new release without losing anything.
Goal
You have a backup of Studio that you have restored once, and you know the three commands that update it.
Before you start
Know what to copy. Studio keeps everything in two places. The data volume,
talon-studio_talon_data, holds the database, your workspaces' Git repositories and the detection content library. The.envfile beside the compose file holds your settings and the encryption key. A backup is both. The volume without.envis ciphertext.Back up the volume. Stop Studio first, so the database files are consistent, then archive the volume and start it again:
docker compose down docker run --rm \ -v talon-studio_talon_data:/data:ro \ -v "$PWD/backups:/backup" \ busybox tar czf /backup/talon-data.tgz -C /data . docker compose up -dThe archive lands in
backups/talon-data.tgz. Copy it and.envsomewhere that is not this host.
Prove the backup restores. A backup you have never restored is a hope. This replaces the volume with the archive's contents:
docker compose down -v docker volume create talon-studio_talon_data docker run --rm \ -v talon-studio_talon_data:/data \ -v "$PWD/backups:/backup" \ busybox sh -c "tar xzf /backup/talon-data.tgz -C /data" docker compose up -d curl -s localhost:3000/api/healthdocker compose down -vdeletes the volume, database included. It belongs in a restore and nowhere else, so keep-vout of any script.
Update to a new release. Take a backup first. Then open
.env, move the tag at the end ofTALON_STUDIO_IMAGEto the new release, and run:docker compose pull docker compose up -d curl -s localhost:3000/api/healthThe new image starts against the same volume and applies its database migrations on boot. Your workspaces, users and key carry over.
Know how to go back. Migrations only run forward. To roll back, put the previous tag in
TALON_STUDIO_IMAGE, restore the backup you took before the update, and rundocker compose up -d.
You should now see
After the restore and after the update, the health check answers:
{"status":"ready"}
Open Studio and your organisation, workspace and password are as you left them. The release Studio is running is shown at the foot of the sidebar, and on the sign-in screen.
Quick check
Go deeper
- Backup & Restore, for what each folder on the volume holds and for rotating the encryption key.
- Upgrading, for the full update sequence with its checks.
- Update, roll back, remove, for removing an install completely.