Backup Recovery

SPEC_BACKUP_RECOVERY.md · 2026-04-20

SPEC_BACKUP_RECOVERY.md

CGNT-1 Specification — Backup & Disaster Recovery Protocol

Status: SPECIFIED

Version: v1.0

Author: VELA (Thread #13)

Conceived by: NOUS (α.13)

Date: 2026-04-20

Priority: CRITICAL — flagged by SPEC_MEMPERSISTX as the #1 infrastructure gap


PURPOSE

The ship currently has NO automated backup. 149 specs, 5 months of work, the entire CSDM kernel, every training corpus, every engine — all on one DigitalOcean VPS. One disk failure, one accidental deletion, one billing hiccup = total loss. This spec fixes that.

Current state: 1-1-0 (one copy, one medium, zero off-site). Unacceptable.

Target state: 3-2-1 (three copies, two media, one off-site). Industry standard. Required before any product launch.


THE THREE COPIES

Copy 1 — VPS PRIMARY (exists now)

Copy 2 — CLOUD BACKUP (to build)

Copy 3 — LOCAL SOVEREIGN (to build)


WHAT GETS BACKED UP

| Directory | Priority | Copy 2 | Copy 3 | Notes |

|---|---|---|---|---|

| ~/memories/ (149 specs) | CRITICAL | ✅ | ✅ | The canon. Loss = catastrophic |

| Engine source (routx_engine.py etc) | CRITICAL | ✅ | ✅ | Rebuild would take weeks |

| Training corpora (JSON/JSONL) | HIGH | ✅ | ✅ | Already partially on GCS |

| ~/.env + credentials | HIGH | ✅ encrypted | ✅ encrypted | Never plaintext in backup |

| ~/radio/ | MEDIUM | ✅ | ✅ | Crew broadcast history |

| ~/brain_orders/ | HIGH | ✅ | ✅ | Customer data |

| HANDSHAKE files | MEDIUM | ✅ | ✅ | Context persistence |

| LOBSTER_LOG.md | LOW | ✅ | ❌ | Operational, not existential |

| Ollama model files | LOW | ❌ | ❌ | Rebuildable from training data |

| Node modules, venvs | SKIP | ❌ | ❌ | Reinstallable |


WHAT DOES NOT GET BACKED UP


BACKUP SCRIPTS

Daily cloud backup — ~/scripts/backup_to_gcs.sh


1. gsutil rsync -r ~/memories/ gs://cgnt1-backup/memories/
2. gsutil rsync -r ~/radio/ gs://cgnt1-backup/radio/
3. tar + encrypt ~/.env → gsutil cp to gs://cgnt1-backup/secrets/
4. gsutil rsync critical engine files
5. Log result to ~/backup.log with timestamp and file count
6. On failure: alert via COMMX broadcast

CRONX entry: 0 3 * bash ~/scripts/backup_to_gcs.sh

Daily local backup — ~/scripts/backup_to_local.sh


1. rsync -avz from VPS to Chromebook (or Tiiny when available)
2. Log result
3. On failure: alert

CRONX entry: 30 3 * bash ~/scripts/backup_to_local.sh

Weekly VPS snapshot


DISASTER RECOVERY SCENARIOS

Scenario 1 — Accidental file deletion

Scenario 2 — VPS disk failure

Scenario 3 — DigitalOcean account compromised

Scenario 4 — GCS account compromised

Scenario 5 — Total loss (VPS + GCS + local)


ENCRYPTION


VERIFICATION


INVARIANTS

INV-01: 3-2-1 achieved before any product launch. Non-negotiable.

INV-02: Backups run daily at 03:00 ET. Automated. No human required.

INV-03: Credentials are ALWAYS encrypted in backup. Never plaintext.

INV-04: Backup failures trigger COMMX alerts. Silence is not OK.

INV-05: Monthly restore test. The backup you never test doesn't exist.

INV-06: Ollama models are NOT backed up — they're rebuilt from training data + GGUF conversion. The training data IS backed up.

INV-07: Backup scripts are themselves backed up (stored in ~/memories/ as part of the canon).


INTEGRATION

| System | Relationship |

|---|---|

| SPEC_MEMPERSISTX.md | This spec closes the CRITICAL gap identified at Layer 3. 1-1-0 → 3-2-1. |

| CRONX | Schedules backup_to_gcs.sh at 03:00 ET and backup_to_local.sh at 03:30 ET daily. |

| GAPX | Monitors backup.log staleness. >48h without successful backup = HIGH alert. |

| COMMX | Receives failure alerts from backup scripts. Crew is notified if backup fails silently. |

| SPEC_TIINY_PARTNERSHIP.md | Copy 3 migrates from Chromebook to Tiiny Pocket Lab at August 2026 hardware arrival. |


Jeremy Zlabis

Chronogeometer · Visionary · Disruptor · Chief

42 Sisters AI · East York, Toronto

🍁 Φ 0.042