1. Prepare your installation
Pause scheduled Missions and incoming triggers. Let running and queued work finish, and stop any additional app or worker processes that write to this database. Open your terminal in the existingsydekyks folder for the downloadable quick start, or the repository root for a checkout installation.
The setup block below creates a dated private backup folder and a dc shortcut for your existing Compose configuration. Use the same terminal for the following steps. Run each step only after the previous one succeeds; stop if any command fails.
- Windows (PowerShell)
- macOS and Linux
.env: it contains the encryption/JWT keys, database password and the previous image setting. Never post it in an issue or send it with logs.
2. Save the database, Redis and application files
These commands work in the same PowerShell or macOS/Linux terminal. PostgreSQL and Redis stay running while the app and its worker are stopped.pg_restore --list checks that the archive can be read; it does not prove that a full restore will succeed. See the PostgreSQL backup documentation and Docker Compose file-copy reference.
Confirm the dated folder contains the environment and Compose files, images.txt, postgres.dump, redis.rdb and app-data. If you configured S3 or other external file storage, back that up separately. The default database archive includes files stored in PostgreSQL.
The app remains stopped so you can continue with the upgrade steps. If you cancel before changing the image or applying migrations, restart the existing app with dc up -d --no-deps --wait --wait-timeout 300 app.
3. Rehearse recovery
Restore into an isolated installation before upgrading production. Use the saved image version, Compose configuration and environment. Give the rehearsal its own Compose project and volumes, and block outbound provider actions so restored jobs cannot send messages or change business records. Restorepostgres.dump with pg_restore into an empty PostgreSQL database. Restore the saved Redis state and application files, and supply the original encryption key. Do not restore over the live database as a test. Check existing account access, Connected Account decryption, Missions, tables, files and worker connectivity.
Record the backup identifier, image version/digest, restore environment and data checks. A created backup file or successful archive listing alone is not a completed recovery rehearsal.
If you need to roll back
A migration can make an older application image incompatible with the updated database. Do not assume that changing the image back reverses a migration. Use the matching pre-upgrade database, Redis state, files, environment and application image from your rehearsed recovery plan. Keep the original volumes and failed installation until recovery is confirmed. Never usedocker compose down --volumes on data you need to keep. Do not substitute an upstream image for Sydekyks merely because the version labels look similar.