Comparisons and explanations · Intermediate

Replication versus backup

Distinguish replicas used for service continuity from backups used for reconstruction, including mistaken changes, retention and tested restoration.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. Separate the failures being addressed
  2. A mistaken DELETE can replicate successfully
  3. Make RPO and RTO concrete
  4. Evaluate shared failure domains
  5. Test failover and restoration as different procedures
  6. Combine complementary recovery roles
  7. Ask Logeia about this articleCheck your understanding

Separate the failures being addressed

Replication distributes changes so another location can maintain a state related to the primary. Backups preserve base state or history suitable for reconstruction. Having a replica is not equivalent to being able to return to a prior correct state. Continuing service after one server stops and recovering before yesterday’s mistaken deletion require different capabilities. List process failure, media loss, erroneous updates, and credential compromise separately. Two machines do not automatically address all those cases. The comparison begins with failure coverage rather than treating the number of copies as a universal measure of recoverability or continuity.

A mistaken DELETE can replicate successfully

Suppose an erroneous DELETE commits on the primary. Fast, correct replication can faithfully transmit that mistake to its replica. Low replication lag does not promise preservation of the previous correct rows. Conversely, one backup need not recover legitimate updates made after it was captured. Retained generations, logs, and recovery targets determine the recoverable range. Both mechanisms involve time: which changes are applied now and which states remain available until later. Merely saying that data exists twice hides that distinction. A replica can be functioning exactly as designed while no longer containing the historical state the business needs to recover.

Make RPO and RTO concrete

Recovery point objective describes tolerated recent data loss, while recovery time objective concerns the time to restore required service. In an illustrative setup with only a midnight backup, updates later that day need another recovery source after an evening failure. Continuous WAL retention or a different backup method can change that outcome. A fast replica failover also needs analysis of undistributed writes and conflicting writes after an incorrect promotion. Define objectives for a particular failure and service rather than quoting one number without scope. Low downtime and low data loss are related goals, but improving one does not automatically establish the other.

Evaluate shared failure domains

A backup and replica in one failure domain can be lost together through a storage fault, outage, or administrative mistake. Credentials capable of deleting both can further narrow the protection. Place storage, permissions, retention, and required keys according to the failures being addressed. Encrypted backup files can be unusable if their keys are lost, so reading stored bytes differs from decrypting and starting a database. Count independent recovery paths, not only copies. Ask which fault or operation can reach several copies simultaneously. That analysis explains why adding another copy inside an unchanged failure domain may offer less protection than the diagram initially suggests.

Test failover and restoration as different procedures

Replication testing examines receive and apply progress, catch-up after interruption, and ownership of writes during failover. Backup testing restores elsewhere and checks data, configuration, extensions, permissions, and application operations. A successful backup-job status does not prove that every future restoration dependency is available. Fast promotion of a replica does not establish recovery of an older state either. Record measured durations and the recovered data boundary during actual tests. The comparison here describes verification procedures; it does not claim that a production failure test or a particular restoration was performed. Different recovery paths deserve evidence appropriate to their own contracts.

Combine complementary recovery roles

One design can use a replica for continuity and retained backup generations plus required logs for reconstruction after mistaken changes or media loss. Monitor capacity, delivery interruption, failed backup jobs, retention coverage, and changes to credentials or keys. Revisit restoration after data volume or architecture changes rather than testing only on installation day. Avoid an unconditional promise to recover from any possible loss. State the failure, surviving information, procedure, and expected duration. Replication and backup are often more useful as complementary protections than as interchangeable alternatives competing for one checkbox labelled data safety. Their different time and failure boundaries are precisely why both can be necessary.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 17

Choose a learning path