- Category: A. Data-Intensive Design
- English term: Backup and Restore / Disaster Recovery
- Related: Source of Truth (System of Record) · Single Point of Failure (SPOF) and Failover · Append-only Log · Checkpoint · Distinguishing 'Implemented' from 'Running' (Definition of Done)
General Meaning
Backup and restore refers to systematically copying operational data and raw source records to a physically or logically isolated secondary storage location, enabling full reconstruction of system state following hardware breakdown, data corruption, or operator mistake.
Merely running automated backup dumps does not constitute disaster recovery preparedness; disaster readiness is only genuinely established once restore workflows are regularly rehearsed and validated through routine recovery testing.
Why It Matters
- Recovering from hardware failures and storage corruption: Enables rolling back corrupted filesystems to known clean snapshots when physical drives or cloud services fail.
- Protecting against operator error and malicious attacks: Ensures that accidental deletions or ransomware encryption events can be mitigated by restoring clean historical state.
- Ensuring regulatory compliance and audit provenance: Preserves untransformed raw ingestion files to establish legal origin proof and satisfy mandatory data retention periods.
How the Site Factory Uses It
In the Site Factory, application code and materialized database projections are safely tracked inside private Git repositories and Cloudflare D1 databases. However, large municipal PDF archives and raw scraped data are deliberately excluded from Git repositories and stored in Cloudflare R2 object storage buckets, such as furusato-archive-backup.
Restoration workflows currently depend on site-specific ingestion scripts rather than a unified global orchestrator. The Site Factory explicitly highlights this architectural constraint in docs/architecture.md under the policy "do not display as implemented capabilities," preventing false claims of automated full disaster recovery. Ingestion jobs like com.furusatoarchive.backup run daily at 07:00, and local plist and system configurations keep versioned backups (such as .before-codex-20261024) prior to modifications.
Caveats & Operational Rules
- Having a backup is not the same as being able to restore: If restore scripts are unautomated or untested against real recovery scenarios, backups provide zero guarantee during actual emergencies.
- Never commit massive raw datasets into Git: Committing multi-megabyte PDFs or CSVs bloats Git repositories, degrading clone speeds and patrol routines; store raw blobs in dedicated object storage like Cloudflare R2.
- Do not exaggerate unimplemented recovery automation: Without an automated one-click disaster recovery mechanism, the Site Factory strictly forbids claiming full disaster recovery readiness, explicitly logging current limits in architecture documentation.
Related Terms
- Source of Truth (System of Record)
- Single Point of Failure (SPOF) and Failover
- Append-only Log
- Checkpoint
- Distinguishing 'Implemented' from 'Running' (Definition of Done)
References
- Book: Martin Kleppmann, Designing Data-Intensive Applications, Chapter 11 (Stream Processing: Batch Processing and Data Reproducibility)
Verified: 2026-11-08