Backup and Restore¶
PostgreSQL is OpenEA Community's authoritative persistent store. Back it up before upgrades, large imports, and other significant repository changes.
Docker backup¶
For the default Docker Compose configuration:
docker compose exec -T postgres \
pg_dump -U openea -d openea -Fc \
> openea-backup.dump
If you changed POSTGRES_USER or POSTGRES_DB, substitute those values.
Protect configuration separately¶
Database backups do not include your .env file. Protect configuration and secrets separately and do not commit them to source control.
Restore procedure¶
Restore into a tested empty PostgreSQL database using standard PostgreSQL tools.
For Docker installations:
- Stop the OpenEA web and worker so no writes occur during recovery.
- Restore the database.
- Start the stack.
- Run Alembic to bring the restored database to the current schema level.
docker compose exec web alembic upgrade head
For OpenEA Community 1.5.2, the current head is:
0015_phase15
Verify after restore¶
Check:
docker compose ps
curl http://localhost:8000/health
curl http://localhost:8000/health/ready
docker compose exec web alembic current
Then verify users, representative architecture records, relationships, audit history, metrics, and findings.