Compare recovery copies by what they capture, where their consistency point lives, how quickly they restore, and which log/key/version dependencies must survive with them.

Logical vs Physical Backups, Snapshots, Continuous Backups, and Change-Log Archiving

AtlasMart begins recovery engineering by identifying what each backup form captures, where its consistency point lives, and which logs, keys, metadata, and versions are required to restore it.

Advanced125–165 minutesBackup-chain and PITR labPython 3.13+ · standard libraryVendor-neutral · free/local mandatory pathLast reviewed: August 2026
01

Distinguish logical exports, physical/database-native copies, snapshots, incremental/continuous backups, and archived change logs by what they actually capture.

02

Define consistency points, restore chains, retention, encryption-key dependencies, and version compatibility before declaring a backup usable.

03

Reconstruct AtlasMart to a target log position and diagnose a deliberately inconsistent multi-volume snapshot.

04

Choose backup forms from recovery objectives rather than from backup speed or storage cost alone.

1. The backup question is “what can I restore, to which point, under which dependencies?”

AtlasMart can copy data in several ways, but a copy becomes a recovery asset only when its consistency point, required logs, schema metadata, encryption keys, topology assumptions, and restore procedure are known. A logical backup represents database objects/rows in logical form; a physical backup copies storage-engine files or database-native blocks; a snapshot freezes storage references at a point in time; an incremental backup captures changes relative to prior backup state; and a continuous archive preserves the change log needed to replay beyond a base copy.

These categories overlap differently across products. Do not assume a filesystem snapshot is transaction-consistent merely because the storage platform calls it atomic, especially when data, write-ahead log (WAL), tablespaces, or metadata span separate volumes.

2. Consistency point and restore chain

A recovery chain should identify a base copy and the ordered changes required after it. For a WAL-based system, the chain can be “base backup at LSN 100 + archived WAL 101…120.” For an immutable-file engine, it may be a snapshot plus incremental SSTables and schema definitions. A restore must know where replay starts, where it may stop, and which artifacts are mutually compatible.

Version compatibility is part of backup metadata

Physical formats can change across database versions. A backup policy therefore records engine version/edition, storage format, extensions, encryption/key IDs, and supported restore/upgrade path. “We retained the files” is not equivalent to “the current recovery environment can read them.”

3. Logical, physical, snapshot, and continuous recovery tradeoffs

Logical exports are portable and selective but may take longer to restore because indexes and physical layout are rebuilt. Physical/database-native copies often restore large datasets faster but are more coupled to engine/version/storage layout. Snapshots can be fast and space-efficient but need a documented database-consistency mechanism. Continuous log archiving narrows the recovery point objective (RPO) and enables point-in-time recovery, but only if log retention is complete, monitored, encrypted, and tested.

Form Strength Typical hidden dependency
Logical export Portability, selective object restore Schema/order, rebuild time, large-volume duration
Physical/native Fast byte-level restore Version/format/topology compatibility
Snapshot Fast point capture Cross-volume/database consistency
Continuous/incremental Smaller RPO, PITR Unbroken log/change chain and retained base

4. AtlasMart lab: base copy, replay, and an inconsistent snapshot

Mandatory lab environment

Python 3.13+ standard library only. The log sequence number (LSN) values are teaching positions, not PostgreSQL output or measured timings.

python · AtlasMart deterministic simulation
from copy import deepcopy

base_100 = {
    "lsn": 100,
    "orders": {"o-7": {"status": "created", "total": 50}},
    "inventory": {"sku-1": 10},
    "schema_version": 3,
}
log = [
    (101, "order_paid", {"order_id":"o-7"}),
    (102, "reserve_stock", {"sku":"sku-1", "qty":2}),
    (103, "create_order", {"order_id":"o-8", "total":30}),
    (104, "reserve_stock", {"sku":"sku-1", "qty":1}),
]

def apply(state, entry):
    lsn, kind, payload = entry
    if kind == "order_paid": state["orders"][payload["order_id"]]["status"] = "paid"
    elif kind == "reserve_stock": state["inventory"][payload["sku"]] -= payload["qty"]
    elif kind == "create_order": state["orders"][payload["order_id"]] = {"status":"created", "total":payload["total"]}
    state["lsn"] = lsn

def recover_to(target_lsn):
    state = deepcopy(base_100)
    for entry in log:
        if entry[0] <= target_lsn:
            apply(state, entry)
    return state

print("CONSISTENT BASE + CHANGE LOG")
for target in (100, 102, 103, 104):
    s = recover_to(target)
    print(target, s)

print("\nLOGICAL EXPORT AT LSN 102")
logical = recover_to(102)
print({"orders": logical["orders"], "inventory": logical["inventory"]})
print("logical export reconstructs rows/values; indexes and physical layout are rebuilt separately")

print("\nPITR TO LSN 103")
pitr = recover_to(103)
print("restored_lsn=", pitr["lsn"], "orders=", sorted(pitr["orders"]), "stock=", pitr["inventory"]["sku-1"])

print("\nBROKEN NON-ATOMIC MULTI-VOLUME SNAPSHOT")
orders_at_104 = recover_to(104)["orders"]
inventory_at_102 = recover_to(102)["inventory"]
broken = {"orders":orders_at_104, "inventory":inventory_at_102}
print("orders copied from lsn 104; inventory copied from lsn 102")
print(broken)
print("evidence: o-8 exists but its lsn-104 stock reservation is missing")

print("\nSAFE RULE")
print("record one consistency point, required logs, schema/version metadata, encryption-key IDs, and restore compatibility together")
Expected evidence

The consistent base plus ordered changes can recover AtlasMart exactly to LSN 103. The deliberately broken snapshot combines orders from LSN 104 with inventory from LSN 102, leaving an order visible without its matching stock reservation. That proves why a snapshot needs one coherent consistency point.

5. What the evidence proves—and does not prove

A deterministic replay proves that the modeled artifacts are sufficient for the modeled state transition. It does not prove a production backup captures every database file, secret, external blob, extension, queue, or KMS dependency. Production evidence should include backup start/end positions, archived-log continuity, manifest hashes, retention class, encryption/key IDs, restore compatibility, and a successful isolated restore.

6. Production judgment

Choose backup methods from RPO, recovery time objective (RTO), dataset size, restore granularity, topology, retention, legal-hold, encryption, and operator skill. Monitor backup age, archive gaps, failed uploads, copy immutability, key availability, restore duration, and version compatibility. The next lesson tests the most dangerous misconception in distributed systems: live replicas are not independent recovery copies.

Check your understanding

  1. Why is a logical export not automatically equivalent to a physical backup?
  2. What is a recovery chain?
  3. Why can multi-volume snapshots be inconsistent?
  4. What does PITR require beyond a base backup?
  5. Why record engine/version/key metadata with a backup?
Review the answers

1. It captures logical objects/data rather than necessarily preserving the physical storage layout, indexes, or engine-native recovery state.

2. The base backup plus the ordered incremental/log artifacts and metadata required to reconstruct a target state.

3. Different volumes may represent different database moments unless the database/storage system provides one coordinated consistency point.

4. A complete ordered archive of the change/WAL records from the base consistency point through the requested recovery target.

5. Because byte copies may be unreadable or undecryptable if the required format, software, extensions, or keys are unavailable during recovery.

References

Foundational claims use standards, specifications, primary research, or current official documentation where practical. Product references are optional implementation anchors; the mandatory labs are vendor-neutral.

Keep knowledge open

Help the academy stay free and grow.

If these tutorials save you time, a small donation supports new lessons, technical review, diagrams, examples, and long-term maintenance.

ETHEthereum / ERC-20 only
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0

Send only Ethereum or ERC-20 compatible assets to this address.