Context
DumpStation manages Postgres backups for multiple teams. Different databases have different storage needs — some are subject to data-residency rules that require S3-in-region, others want Cloudflare R2 to dodge egress fees, some are air-gapped and need MinIO on a private network.
Decision
Storage is a per-database configuration, not a global one. Three first-class adapters ship in-box:
- AWS S3 — any region, standard IAM, server-side encryption defaults on.
- Cloudflare R2 — zero egress fees, ideal for restore-heavy workloads, S3-compatible.
- MinIO — self-hosted, on-prem, behind your own firewall.
The runtime adapter is selected from the database's saved profile. Switching targets is a config edit, not a re-deploy.
Consequences
Positive:
- Compliance lives next to the database it applies to — no global config to tip the wrong way.
- Egress-cost optimisation per workload — R2 for the noisy ones, S3 for the ones already inside an AWS account.
- On-prem / air-gapped deployments are first-class, not a fork.
Negative:
- Three adapters to maintain. Each provider rolls out SDK-incompatible changes occasionally.
- Cross-target migration tooling is a thing we have to write ourselves; the S3 API surface alone is not enough.
- Operators have to understand which target they picked. Adds documentation overhead.