Backup & upgrade

Back up the database and upgrade to a new version safely.

Since all data lives in PostgreSQL, backup is a standard database dump. Upgrading is a matter of swapping the image and running migrations.

Backup

# daily dump
docker compose exec db pg_dump -U myway myway > myway-$(date +%F).sql

# restore
cat myway-2026-07-12.sql | docker compose exec -T db psql -U myway myway

Upgrade

  1. 1Take a database backup first.
  2. 2Update the new image tag in your docker-compose file.
  3. 3Pull the new version with docker compose pull && docker compose up -d.
  4. 4Run migrations; check the release notes for breaking changes.

Migrations are forward-only and idempotent; still, in production always back up first, then upgrade.