diff --git a/AssetRegister.yaml b/AssetRegister.yaml index 11337a5..1170ddb 100644 --- a/AssetRegister.yaml +++ b/AssetRegister.yaml @@ -372,8 +372,7 @@ assets: recovery_path: method: git clone from mirror or dump restore status: operational - gaps: - - "disaster-control not mirrored off primary Gitea (DISCTL-WP-0002-T01)" + gaps: [] - id: asset-state-hub name: Custodian State Hub @@ -390,12 +389,18 @@ assets: tier: T1 owner: Bernd host: gitea.coulomb.social - backup: git push only + mirror: + url: https://forgejo.coulomb.social/coulomb/disaster-control + host: railiance01 + remote: forgejo-remote:coulomb/disaster-control.git + backup: git push to origin + mirror sync recovery_path: - method: git clone from mirror (not yet configured) - status: at_risk - gaps: - - "No off-Gitea mirror (DISCTL-WP-0002-T01)" + method: git clone from Forgejo mirror; see docs/mirror-sync.md + backup_schedule: after each push to origin (./tools/sync-mirror.sh) + status: operational + references: + - docs/mirror-sync.md + - tools/sync-mirror.sh # ── T2 Runtime platforms ───────────────────────────────────────────────────── diff --git a/DataRegister.yaml b/DataRegister.yaml index b61abae..52b8d21 100644 --- a/DataRegister.yaml +++ b/DataRegister.yaml @@ -269,13 +269,14 @@ data_classes: name: disaster-control repository content tier: T1 source_of_truth: gitea.coulomb.social/coulomb/disaster-control + mirror: forgejo.coulomb.social/coulomb/disaster-control backup_stream: backup-gitea-canonical - backup: git push only; no mirror yet - recovery_method: git clone from off-Gitea mirror (T01) or gitea dump + backup: git push to origin + ./tools/sync-mirror.sh + recovery_method: git clone from Forgejo mirror; see docs/mirror-sync.md rpo: 24h rto: 4h owner: Bernd - status: at_risk + status: operational status_legend: operational: "Backup mechanism exists and has run successfully" diff --git a/INTENT.md b/INTENT.md index 3650027..55a5a05 100644 --- a/INTENT.md +++ b/INTENT.md @@ -26,7 +26,6 @@ This repo documents, plans, and evidences resilience for the Coulomb stack. It d ## Current state -In progress (`DISCTL-WP-0002`): registers, `ResiliencePolicy.md`, `BackupPolicy.md`, -`RTO-RPO-Matrix.md`, panic sheet, full-server-loss runbook, and incident playbooks -exist. Off-Gitea mirror (`DISCTL-WP-0002-T01`) and next restore drill (`T06` exit -criterion) remain open. +In progress (`DISCTL-WP-0002`): registers, policies, runbooks, playbooks, and +Forgejo mirror (`forgejo.coulomb.social/coulomb/disaster-control`) are in place. +Next restore drill (`T06` exit criterion) remains open. diff --git a/README.md b/README.md index d22f67d..c52a9b5 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,15 @@ actually works. See `INTENT.md` and `ResiliencePolicy.md`. ## Off-site mirror (R10) -This repo **must** survive loss of the primary Gitea. Mirror status: +This repo **must** survive loss of the primary Gitea. -| Mirror | Location | Refresh | Status | +| Role | Location | Refresh | Status | | --- | --- | --- | --- | -| Primary | `gitea.coulomb.social/coulomb/disaster-control` | git push on commit | operational | -| Off-Gitea mirror | **Not configured** | — | **open** (`DISCTL-WP-0002-T01`) | +| Primary | `gitea.coulomb.social/coulomb/disaster-control` | `git push origin` | operational | +| Mirror | `forgejo.coulomb.social/coulomb/disaster-control` (private) | `./tools/sync-mirror.sh` after push to origin | operational | -**Target:** at least one private mirror on infrastructure independent of -CoulombCore/Gitea (e.g. GitHub private mirror). When configured, update this -table with URL and refresh method (`git push --mirror` or scheduled sync). +Forgejo runs on **railiance01** — independent of CoulombCore/Gitea. See +`docs/mirror-sync.md` for setup and recovery. ## Session orientation diff --git a/ResiliencePolicy.md b/ResiliencePolicy.md index 2f5e163..1e70769 100644 --- a/ResiliencePolicy.md +++ b/ResiliencePolicy.md @@ -68,7 +68,7 @@ exists in `TestEvidence/` for an untested T1 system. `disaster-control` must survive the disasters it describes: -1. At least one git mirror off primary Gitea (see `DISCTL-WP-0002-T01`). +1. At least one git mirror off primary Gitea — `forgejo.coulomb.social/coulomb/disaster-control` (see `docs/mirror-sync.md`). 2. Registers, policies, and evidence readable without production infrastructure. 3. Panic sheet (`PanicSheet.md`) executable by a competent stranger. diff --git a/docs/mirror-sync.md b/docs/mirror-sync.md new file mode 100644 index 0000000..8ade478 --- /dev/null +++ b/docs/mirror-sync.md @@ -0,0 +1,52 @@ +# Off-Gitea mirror sync + +`disaster-control` is mirrored to **Forgejo on railiance01** — infrastructure +independent of CoulombCore/Gitea (R10 / `DISCTL-WP-0002-T01`). + +| Role | Remote | URL | +| --- | --- | --- | +| **Primary** | `origin` | `gitea-remote:coulomb/disaster-control.git` | +| **Mirror** | `mirror` | `forgejo-remote:coulomb/disaster-control.git` | + +Web: https://forgejo.coulomb.social/coulomb/disaster-control (private) + +## One-time setup (per clone) + +```bash +git remote add mirror forgejo-remote:coulomb/disaster-control.git +``` + +## Refresh mirror + +After pushing to Gitea (`origin`): + +```bash +./tools/sync-mirror.sh +# or manually: +git push mirror main --tags +``` + +Mirror all branches (if needed): + +```bash +git push mirror --all --tags +``` + +## When to sync + +- After every commit pushed to `origin` that should survive Gitea loss +- After workplan or policy changes (registers, `BackupPolicy.md`, evidence) +- Before infrastructure migration work (`bin/railiance preflight` on dev workstation) + +## Recovery + +If Gitea is unavailable: + +```bash +git clone forgejo-remote:coulomb/disaster-control.git +# or HTTPS with token: +git clone https://forgejo.coulomb.social/coulomb/disaster-control.git +``` + +Forgejo is the **mirror**, not the canonical workflow remote — continue using +Gitea as `origin` until org cutover decisions say otherwise. \ No newline at end of file diff --git a/tools/sync-mirror.sh b/tools/sync-mirror.sh new file mode 100755 index 0000000..6ee2579 --- /dev/null +++ b/tools/sync-mirror.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Push current branch to the off-Gitea Forgejo mirror (R10). +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "${ROOT}" + +if ! git remote get-url mirror &>/dev/null; then + echo "mirror remote missing — run: git remote add mirror forgejo-remote:coulomb/disaster-control.git" >&2 + exit 1 +fi + +BRANCH="${1:-$(git branch --show-current)}" +echo "==> Pushing ${BRANCH} to mirror (forgejo-remote:coulomb/disaster-control.git)" +git push mirror "${BRANCH}" --tags +echo "==> Mirror sync complete" \ No newline at end of file diff --git a/workplans/DISCTL-WP-0002-resilience-foundation.md b/workplans/DISCTL-WP-0002-resilience-foundation.md index 69938e7..fe80ea5 100644 --- a/workplans/DISCTL-WP-0002-resilience-foundation.md +++ b/workplans/DISCTL-WP-0002-resilience-foundation.md @@ -32,7 +32,7 @@ items 7–8 are T03/T04/T06 below; its cross-repo items are tracked by T08. ```task id: DISCTL-WP-0002-T01 -status: progress +status: done priority: high state_hub_task_id: "f2f8648e-110c-455e-9745-6e2aa7f4fdfa" ```