Backup & restore
Orrery stores all application state in the Compose postgres service (postgres:18) on the pgdata volume. Run all commands below from your Orrery directory where compose.yaml and .env live.
Create a backup
Section titled “Create a backup”pg_dump takes a consistent snapshot while Orrery stays online — no downtime is needed:
docker compose exec -T postgres pg_dump -U orrery -d orrery -Fc > "orrery-$(date +%Y%m%d-%H%M%S).dump"-Fccreates a portable, compressed custom-format archive.-Tdisables pseudo-TTY allocation so binary output is never corrupted.
Verify the archive is readable before moving it to off-host storage:
docker compose exec -T postgres pg_restore -l < orrery-20261122-040000.dump | headRestore from a backup
Section titled “Restore from a backup”Restoring replaces the entire orrery database. Stop the app container first so no writes race the restore, while keeping postgres running.
docker compose stop orrerydocker compose exec -T postgres psql -U orrery -d postgres -c 'DROP DATABASE IF EXISTS orrery WITH (FORCE);'docker compose exec -T postgres psql -U orrery -d postgres -c 'CREATE DATABASE orrery;'docker compose exec -T postgres pg_restore -U orrery -d orrery --no-owner --no-privileges < orrery-backup.dumpdocker compose start orreryWITH (FORCE) drops any stray database connections cleanly, and --no-owner --no-privileges ensures portability across fresh Postgres volumes.
Verify the restore
Section titled “Verify the restore”-
Check tables and health probes
Terminal window docker compose exec -T postgres psql -U orrery -d orrery -c '\dt'curl -fsS http://localhost:8080/healthzcurl -fsS http://localhost:8080/readyz -
Spot-check application data
Sign in at
PUBLIC_URLand check a known project, issue identifier (KEY-N), and activity timeline. -
Verify encrypted secrets
Open installation SMTP settings (and Workspace Webhooks if configured) to confirm encrypted secrets decrypt cleanly under your restored
ORRERY_ENCRYPTION_KEY. -
Check logs
Terminal window docker compose logs -f orrery
Upgrade & rollback checklist
Section titled “Upgrade & rollback checklist”Follow this sequence for every ORRERY_VERSION upgrade:
- Record the currently running
ORRERY_VERSIONtag and take a fresh backup verified withpg_restore -l. - Confirm your
.envcopy containingORRERY_ENCRYPTION_KEYis stored safely alongside the dump. - Update
ORRERY_VERSIONin.env, then rundocker compose pull orrery && docker compose up -d orrery. - Verify
/healthz,/readyz, and sign in to spot-check a project. - If anything goes wrong, roll back in this exact order so the newer image never boots against the restored database:
- Run
docker compose stop orreryand keep it stopped. - Restore the pre-upgrade dump using the drop / create /
pg_restorecommands above (do not startorreryyet). - Set
ORRERY_VERSIONback to the previous tag in.env. - Run
docker compose pull orrery && docker compose up -d orrery. - Repeat the verification checks.
- Run