Decision in brief
Self-host a client-server database when application requirements justify it and someone can own updates, backup integrity, and restores. Start with SQLite for a compatible single-application deployment where write concurrency and local storage fit. Use a managed database if it covers operational work you cannot staff, then verify exactly how backups, credentials, restore, and maintenance work under your plan.

Choose the failure and ownership boundary
Begin with the engine that fits the application, then choose its hosting model. A Docker volume preserves state across container replacement when mounted correctly. Keep a separate engine-aware backup and restore it to a clean host to cover the loss of the original machine.
For PostgreSQL, logical dumps support object transfer and can be useful for restoration to a different major version within documented compatibility limits. Base backups plus archived WAL support point-in-time recovery. A managed service can offer its own point-in-time recovery procedure. For example, Amazon RDS restores into a new DB instance, so the drill must include connection configuration and traffic cutover.
| Application need | First design to test | Decision gate |
|---|---|---|
| One process family and modest concurrent writes | SQLite with an engine-aware backup procedure | Measure busy time and recover the app from an off-host copy |
| Several network clients or server database features | Self-managed PostgreSQL on an owned VM or managed equivalent | Measure write latency, connection recovery, and upgrade ownership |
| Short acceptable recovery point | Test a backup and transaction-log recovery design | Restore before a seeded mistake and check which writes survived |
| Strict uptime with limited staffing | Managed database or explicitly staffed replicated design | Rehearse recovery and check division of responsibilities during failover |
What HN discussions distinguish about database ownership
In a self-hosting PostgreSQL thread, ZeroConcerns described expectations for usable disaster recovery copies and multi-datacenter failover when buying a managed database. Ask the provider to point to those behaviors in your plan, and verify separately whether you can restore or export to a destination outside the service.
In the Portabase launch discussion, killian_larcher described building an agent-based tool for scheduling database backups and restores across multiple networks. Examine the backup system as its own dependency. The person leading recovery should be able to retrieve the encrypted copy and its keys even when both the original host and management endpoint are unavailable.
Restore through the real application path
- Load anonymized fixtures into a test server. Document engine and extension versions, roles, backup locations, retention, and the accepted time and data loss after failure.
- Take the intended backup, create several timestamped transactions, and introduce a synthetic erroneous update. Verify that the backup and any required transaction logs reach a separate storage destination.
- Recover to a fresh host or managed instance, reconnect the test application, and check identities, migrations, read/write behavior, and the data before and after the recovery point.
- Accept only if observed service recovery time and data loss fit the declared objectives and a second operator can perform the restore using the runbook. Stop if any required restore key, dependency, or backup is reachable only through the failed host.