telco

Rehearse a recovery

Restore a closed billing month in isolation, reconcile the journal and check which call details a customer can still retrieve.

On this page

A backup can reproduce an invoice and also bring back a call detail that has since expired. The recovery rehearsal checks both outcomes against evidence held outside the restored database. It uses synthetic customers and starts its own PostgreSQL 17 and reference services on private Docker networks.

Run the rehearsal

Choose the largest acceptable data-loss window (RPO) and time to restore and verify service (RTO), in seconds. The figures below are example limits. Use a local Docker Engine with support for isolated bridge gateways, Python 3.11 or newer and just. Allow enough memory for the disposable PostgreSQL instances.

just recovery 180 300 > recovery-report.json

The default data-volume limit is 384 MiB per database. Each estate has a 600-second execution deadline. Set --volume-mib and --timeout-seconds after the two objectives to change these resource limits.

The command builds the service image from this checkout, freezes the source writers, and takes a logical checkpoint of the reference database. Source and target use the same image and tariff book. Each target receives fresh credentials, a bounded temporary data volume and an internal network. The controller probes the services inside that network. The drill destroys the target after verification.

The checkpoint section identifies the archive and PostgreSQL image, and gives the invoice, journal-row and pending-booking counts. The report records the time between the checkpoint and the simulated interruption, including work acknowledged after the checkpoint. Recovery time runs from the simulated interruption through target creation, restore and the final privacy control. A repeat measures a fresh target separately. Image build and synthetic source setup occur before measurement. A limit is inclusive. A failed or unknown control returns a nonzero exit and identifies its owner and next action in German.

Read the evidence

  • Finance. Compare each sealed original’s bytes and document number, account balances, posting totals and pending delivery identities with the checkpoint. Posting totals come from the journal library’s read-only turnover query, which accountingd recovery-sql prints for the image’s schema. Its balance check must return no rows. A lost acknowledgement must clear after retry with the same economic effect. Finance close
  • Customer privacy. Reapply independently observed dispatch, objection, resolution, revocation and expiry receipts in order. Verify the expired call is unavailable from itemisation, replay and the shared link after a duplicate switch upload. Verify the call covered by the other active objection remains available. Itemisation
  • Completeness. The controller retains the ordered receipts, their final count and digest outside the archive. A missing tail or changed receipt blocks the result. The public report contains counts, timings, control codes and hashes. Treat the backup and receipts themselves as restricted material.

Use just recovery 180 300 --verify to repeat the restore against the same controls and exercise a damaged invoice, missing receipts and breached thresholds. The rehearsal supports the single-database reference deployment. Production recovery also needs independently retained privacy and bank decisions, verified backups, configuration and credentials, operator-agreed limits and a named owner for reopening ingress. For recovery to an arbitrary instant, PostgreSQL requires a base backup and continuous WAL coverage. PostgreSQL recovery

Download Markdown