Define what must survive
A database snapshot alone is not a complete Pledge backup. Your recovery plan must cover the log archive, PostgreSQL, document and output objects with their versions, secret versions, signing keys, certificates, and deployed configuration and images.
Set recovery point and recovery time objectives for the full system. Prove them with an isolated restore drill that exercises a claim, its original documents, and its evidence. Keep a record of the recovery point selected for each dependency.
Database backups
Configure backups and point-in-time recovery through your PostgreSQL provider or independently managed database operator. Set retention, encryption, backup access, and recovery objectives in that service’s operating policy. Database backup resources belong to the database infrastructure release.
Confirm successful base backups and continuous transaction-log archiving. A configured schedule is not proof of recoverability: periodically restore into an isolated database and verify that the selected recovery point can serve Pledge.
Keep restore-drill destinations separate from retained production backups. Use your provider’s restore procedure, then reconnect Pledge to the restored writer and read endpoints.
Broker and object storage
Pledge archives every retained topic to its own bucket (log.archive.bucket) as signed, hash-chained segments, and never trims the broker below what the archive has committed. The archive, not a broker backup, is the log’s history. Preserve Pledge’s topic retention contract on the broker; Kafka provider describes the dependency requirements.
If the broker cluster is lost, start an empty one and record its place in the log once with claims-worker --recover broker-lineage, run as the one-off workload described below. It reports, per partition, any records that were on the lost cluster but not yet archived. That loss is bounded by the archive’s lag bound (log.archive.lagBoundSecs, 900 seconds by default). Treat a reported gap as an incident.
For disaster recovery, replicate the archive and documents buckets to another location, and keep signing keys and database backups with them.
Retain object versions referenced by claims and evidence. Lifecycle deletion must respect the claim retention policy, not just a bucket’s current live contents. Keep recovery access to historical secret and public signing-key versions.
Restore procedure
Perform these steps under your deployment’s change and incident process:
- Stop intake and scheduled producers. Prevent normal workers from writing while restoring.
- Restore the database from backup, or start with an empty database and let recovery rebuild projections from the log. Restore objects and required secret/key material using each provider’s supported procedures. If the broker cluster was lost, start an empty cluster and record its lineage as described above.
- Restore the matching release configuration and verify TLS, credentials, broker addresses, and database access.
- Run one recovery process with the application environment and mounted secrets. Do not run normal modules beside it.
claims-worker --recover
This is a process command, not a command to run on an unconfigured workstation. Use a one-off workload with the same release image and infrastructure configuration as the workers.
- Save the JSON recovery report and process exit status. Investigate every failed chain before restarting workers.
- Start normal workers after verification succeeds. Confirm projection catch-up, dependency health, and a synthetic workflow before reopening intake.
Interpret the recovery report
Recovery refuses to run alongside active driver, output, or judgment writer groups. It catches projections up, checks claim chains, restores partition processing state with effects held, and reports recovery results.
| Field | Meaning |
|---|---|
partitions |
Partitions handled by recovery |
chains.verified |
Chains that passed the selected verification |
chains.failed |
Claim IDs and reasons that need investigation |
chains.consistency_only |
Verification ran without trusted checkpoint keys; consistency is not authenticated checkpoint verification |
chains.uncommitted |
Settlements without the expected commitment |
payments_resumed |
Recovery’s reported pending-payment handling; not evidence that funds moved |
documents_deleted |
Objects removed by the recovery document sweep |
A failed chain produces a failing exit status. Preserve the report and restore evidence; do not edit chain records to clear it. A process interrupted by a signal must be rerun.
The current configured payment rail is none. Do not infer bank reconciliation or an external settlement guarantee from historical recovery notes or a report field.
Return to service
Admission can remain unavailable while projections rebuild. Monitor progress rather than bypassing the gate. Verify an exported claim using evidence verification and confirm that access controls and output destinations still match the restored tenant configuration.