Skip to content

Upgrades and backups

How to upgrade the engine without downtime, and what to back up.

Applies to Engine
View as Markdown
On this page
  1. Upgrading
  2. Backing up
  3. Restoring

Upgrading

  1. Read the changelog for the version.
  2. Run sypnia-data install with the new version (with SYPNIA_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.
  3. 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.

  1. Upgrading
  2. Backing up
  3. Restoring

    Search pages, sections and terms