Backup & restore
How to back up Postgres and recover the registry quickly.
Why you need backups
The registry is your dataset library. If you lose it, you lose:
- discovered dataset URLs
- curated notes
- crawl history
- imported analytics profiles
Minimal backup strategy
Daily dump
pg_dump "$DATABASE_URL" --format=custom --file myorg_registry_$(date +%F).dump
Store dumps in durable storage.
Restore
pg_restore --clean --if-exists --dbname "$DATABASE_URL" myorg_registry_YYYY-MM-DD.dump
Safer restore (registry schema only)
If your database hosts other apps, consider dumping/restoring schema registry only.
pg_dump "$DATABASE_URL" --schema=registry --format=custom --file registry.dump
pg_restore --clean --if-exists --dbname "$DATABASE_URL" registry.dump