Upgrades and backups
How to upgrade the engine without downtime, and what to back up.
On this page
Upgrading
- Read the changelog for the version.
- Run
sypnia-data installwith the new version (withSYPNIA_DATA_INSTALL_ON_START=true, as in Docker and AWS, the new version does it itself when it starts). Its migrations are additive within a minor version (new tables, columns, functions), run in one transaction and are recorded; the running engines keep working. - Roll out the new binary or image. Old and new instances can serve side by side during the rollout.
A major version can remove things; its notes say what to do before upgrading.
Backing up
Everything is in the project’s database: users, sessions, keys, settings, your tables. Back it up the way you back up Postgres: your provider’s snapshots, or pg_dump.
Also keep, separately and safely:
SYPNIA_DATA_MASTER_KEY(or access to the KMS key). Signing keys and stored credentials are encrypted with it. Restoring a database without it works for your data, but every session ends and provider credentials must be entered again.
Restoring
Restore the database, start the engine with the same master key, done. If you restore to another server, update DATABASE_URL and nothing else.