Backup & upgrade
Upgrade
Section titled “Upgrade”git pulldocker compose build && docker compose up -d # migrations run on api boot, idempotentlyDatabase migrations run automatically when the API container boots, and are idempotent — pulling and bringing the stack back up is the whole upgrade.
Backup
Section titled “Backup”Everything lives in two places: the Postgres database and the attachments volume.
# all datadocker compose exec postgres pg_dump -U storyos storyos > backup.sql
# attachments (local-disk driver)docker run --rm \ -v storyos_storyos_attachments:/data \ -v "$PWD":/out \ alpine tar czf /out/attachments.tgz /dataRestore
Section titled “Restore”Restore the database dump into a fresh Postgres, then restore the attachments volume (or your object store), and bring the stack up. Because migrations are idempotent, an upgraded image will reconcile the schema on boot.