Backup and upgrade
Docuvate stores metadata in PostgreSQL and files in MinIO. Back up both layers and apply schema changes through TypeORM migrations.
What to back up
- PostgreSQL volume (
pgdata): users, labels, document metadata, embeddings. - MinIO volume (
miniodata): document blobs. - Optional worker ML cache (
workermlcache): speeds rebuilds, not required for data recovery.
Migrations
Schema changes are TypeORM migrations with up and down in apps/api. The API does not auto-run migrations (migrationsRun: false).
In Docker Compose the one-shot migrate service upgrades before API and worker. Locally: pnpm db:migrate with DATABASE_URL set.
Upgrade flow
db-storage-guard stops startup when Postgres is empty but the MinIO bucket still has files. Override only with DOCUVATE_FRESH_STACK=1 when intentional.
- Back up Postgres and MinIO.
- Build or pull new images; run
docker compose up --build(migrate job must succeed). - Read release notes and OpenAPI for breaking changes; regenerate SDKs if needed.