Complete DISCTL-WP-0002-T01: Forgejo off-Gitea mirror

Create private coulomb/disaster-control on forgejo.coulomb.social,
add mirror sync docs and tools/sync-mirror.sh, update registers and
README. Mark T01 done.
This commit is contained in:
tegwick 2026-07-07 20:28:58 +02:00
parent c655b77690
commit e7aa485c9f
8 changed files with 95 additions and 23 deletions

View file

@ -372,8 +372,7 @@ assets:
recovery_path: recovery_path:
method: git clone from mirror or dump restore method: git clone from mirror or dump restore
status: operational status: operational
gaps: gaps: []
- "disaster-control not mirrored off primary Gitea (DISCTL-WP-0002-T01)"
- id: asset-state-hub - id: asset-state-hub
name: Custodian State Hub name: Custodian State Hub
@ -390,12 +389,18 @@ assets:
tier: T1 tier: T1
owner: Bernd owner: Bernd
host: gitea.coulomb.social 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: recovery_path:
method: git clone from mirror (not yet configured) method: git clone from Forgejo mirror; see docs/mirror-sync.md
status: at_risk backup_schedule: after each push to origin (./tools/sync-mirror.sh)
gaps: status: operational
- "No off-Gitea mirror (DISCTL-WP-0002-T01)" references:
- docs/mirror-sync.md
- tools/sync-mirror.sh
# ── T2 Runtime platforms ───────────────────────────────────────────────────── # ── T2 Runtime platforms ─────────────────────────────────────────────────────

View file

@ -269,13 +269,14 @@ data_classes:
name: disaster-control repository content name: disaster-control repository content
tier: T1 tier: T1
source_of_truth: gitea.coulomb.social/coulomb/disaster-control source_of_truth: gitea.coulomb.social/coulomb/disaster-control
mirror: forgejo.coulomb.social/coulomb/disaster-control
backup_stream: backup-gitea-canonical backup_stream: backup-gitea-canonical
backup: git push only; no mirror yet backup: git push to origin + ./tools/sync-mirror.sh
recovery_method: git clone from off-Gitea mirror (T01) or gitea dump recovery_method: git clone from Forgejo mirror; see docs/mirror-sync.md
rpo: 24h rpo: 24h
rto: 4h rto: 4h
owner: Bernd owner: Bernd
status: at_risk status: operational
status_legend: status_legend:
operational: "Backup mechanism exists and has run successfully" operational: "Backup mechanism exists and has run successfully"

View file

@ -26,7 +26,6 @@ This repo documents, plans, and evidences resilience for the Coulomb stack. It d
## Current state ## Current state
In progress (`DISCTL-WP-0002`): registers, `ResiliencePolicy.md`, `BackupPolicy.md`, In progress (`DISCTL-WP-0002`): registers, policies, runbooks, playbooks, and
`RTO-RPO-Matrix.md`, panic sheet, full-server-loss runbook, and incident playbooks Forgejo mirror (`forgejo.coulomb.social/coulomb/disaster-control`) are in place.
exist. Off-Gitea mirror (`DISCTL-WP-0002-T01`) and next restore drill (`T06` exit Next restore drill (`T06` exit criterion) remains open.
criterion) remain open.

View file

@ -26,16 +26,15 @@ actually works. See `INTENT.md` and `ResiliencePolicy.md`.
## Off-site mirror (R10) ## 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 | | Primary | `gitea.coulomb.social/coulomb/disaster-control` | `git push origin` | operational |
| Off-Gitea mirror | **Not configured** | — | **open** (`DISCTL-WP-0002-T01`) | | 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 Forgejo runs on **railiance01** — independent of CoulombCore/Gitea. See
CoulombCore/Gitea (e.g. GitHub private mirror). When configured, update this `docs/mirror-sync.md` for setup and recovery.
table with URL and refresh method (`git push --mirror` or scheduled sync).
## Session orientation ## Session orientation

View file

@ -68,7 +68,7 @@ exists in `TestEvidence/` for an untested T1 system.
`disaster-control` must survive the disasters it describes: `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. 2. Registers, policies, and evidence readable without production infrastructure.
3. Panic sheet (`PanicSheet.md`) executable by a competent stranger. 3. Panic sheet (`PanicSheet.md`) executable by a competent stranger.

52
docs/mirror-sync.md Normal file
View file

@ -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.

16
tools/sync-mirror.sh Executable file
View file

@ -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"

View file

@ -32,7 +32,7 @@ items 78 are T03/T04/T06 below; its cross-repo items are tracked by T08.
```task ```task
id: DISCTL-WP-0002-T01 id: DISCTL-WP-0002-T01
status: progress status: done
priority: high priority: high
state_hub_task_id: "f2f8648e-110c-455e-9745-6e2aa7f4fdfa" state_hub_task_id: "f2f8648e-110c-455e-9745-6e2aa7f4fdfa"
``` ```