# Backup

## Scope

| Asset | Notes |
| --- | --- |
| PostgreSQL databases | At least `core_platform_db`, `identity_access_db`, Keycloak DB if separate |
| `.env` / secrets | Store outside git in secure vault |
| Let's Encrypt certs + Nginx maps | Edge host |
| Uploaded files (future) | File storage buckets |

## Recommended Postgres Method

```bash
pg_dump -Fc -d core_platform_db -f core_platform_db.dump
pg_dump -Fc -d identity_access_db -f identity_access_db.dump
```

Schedule daily backups; retain per policy (suggested: 7 daily, 4 weekly, 3 monthly).

## Verification

Periodically restore a dump to a scratch instance ([restore.md](restore.md)).

## Related Documents

- [Restore](restore.md)
- [Disaster Recovery](disaster-recovery.md)
- [Release Strategy](../development/release-strategy.md)
