Database HA, Replication, Backup and Disaster Recovery Guide
Compare replication, clustering, RPO/RTO, immutable backup, PITR, failover and DR for PostgreSQL, MySQL, SQL Server, Oracle, MongoDB and MariaDB.
What does this guide solve?
HA, replication, backup and DR are different controls. HA reduces service outage, backup preserves data history, and DR provides recovery in a separate failure domain.
PostgreSQL
Streaming replication and WAL-based standby designs support HA/DR; point-in-time recovery requires base backups plus WAL archiving.
Failover orchestration should be designed using appropriate tooling or a managed platform.
MySQL / MariaDB
Options include asynchronous/semi-sync replication, Group Replication/InnoDB Cluster and MariaDB Galera.
More synchronous models change latency and operational complexity; choose according to workload.
SQL Server
Always On Availability Groups, Failover Cluster Instances and log shipping solve different availability/DR problems.
The transaction-log backup chain is critical for RPO and point-in-time restore.
Oracle
Data Guard addresses standby/DR while RAC addresses selected local HA/scale scenarios; they are not interchangeable.
RMAN backup and restore testing remain necessary even with Data Guard or RAC.
MongoDB
Replica sets provide redundancy and automatic failover; sharding is for scale-out and is not backup.
Measure oplog window, backup consistency and restore procedures against DR objectives.
RPO / RTO and testing
RPO defines acceptable data loss and RTO acceptable outage duration. Technology choices should map to those targets.
Test planned failover, node failure, storage corruption, accidental deletion and full-site loss as separate scenarios.
Frequently Asked Questions
If we have HA, do we still need backups?
Yes. HA does not preserve historical copies against accidental deletion, logical corruption or ransomware.
Does replication guarantee zero data loss?
No. Data-loss exposure varies by replication mode, network behaviour and commit semantics.
How often should DR be tested?
Test periodically according to business criticality and rate of change, including real restore/failover exercises rather than paperwork only.
Official technical sources
- https://www.postgresql.org/docs/current/high-availability.html
- https://dev.mysql.com/doc/refman/8.4/en/replication.html
- https://learn.microsoft.com/sql/database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server
- https://docs.oracle.com/en/database/oracle/oracle-database/23/sbydb/
- https://www.mongodb.com/docs/manual/replication/
- https://mariadb.com/docs/server/ha-and-performance/
Evaluate Your Database Infrastructure
We can review workload, security, hardware, HA and backup requirements together.