Data sovereignty is not achieved by choosing a database with a particular label or placing a server inside a national border. It depends on who controls the data, keys, administrators, backups, recovery process, legal obligations, and ability to move the system when a provider or contract changes.
Define the Threat Model
Start with realistic failure scenarios: accidental deletion, compromised credentials, ransomware, hardware failure, power or network interruption, insider misuse, provider outage, and loss of access to encryption keys. Rank the risks by business impact and define the systems, data classes, and recovery objectives that matter.
Separate Availability From Recoverability
Replication can improve availability, but it can also replicate corruption or accidental deletion. Backups need independent credentials, retention controls, encryption, and a recovery procedure that has been tested. For PostgreSQL, write-ahead logging and base backups support point-in-time recovery when configured and operated correctly.
Protect Data at Every Boundary
Use least-privilege database roles, row-level controls where appropriate, network segmentation, secure secrets management, key rotation, and encryption in transit and at rest. Application-level encryption may be appropriate for selected fields, but it adds key-management, search, and recovery complexity. Document who can access plaintext and under what authority.
Design for Power and Connectivity Constraints
For sites with unreliable power or networks, define safe shutdown procedures, UPS capacity, replication behaviour during partitions, monitoring, and the process for reconciling writes after recovery. A multi-region design can introduce latency, consistency, and operational complexity; it should be selected only when the business requirement justifies it.
Prove Recovery, Do Not Assume It
Set recovery-point and recovery-time objectives with system owners. Run scheduled restore drills into isolated environments, verify application-level consistency, and record the actual recovery time. Test the loss of a database host, a backup credential, and a key-management dependency. An untested backup is an unverified assumption.
Make Custody Auditable
Maintain an inventory of data stores, administrators, service providers, key owners, backup locations, retention periods, and export formats. Review access logs and test that the organisation can retrieve and migrate its own data without relying on a single vendor's goodwill.
A resilient database is one the organisation can secure, restore, audit, and operate under adverse conditions—not one that merely promises zero loss.
Sources and further reading
- PostgreSQL: Backup and RestorePostgreSQL Documentation
- PostgreSQL: Write-Ahead LoggingPostgreSQL Documentation