lingex-backup
LingEx Backup
Source details
- Source revision
303ac01866e6c8a2c13a3c7bb65e9e2b0c7a3ddd- Source SHA-256
4256dbfb4ef08b8bd790414dcf0e11c17aa803223a469e7e948bc271d81d34c1
LingEx Backup
lingex-backup is the canonical owner of LingEx backup, restore and disaster-recovery policy and recovery contracts.
Backup artifacts are operational state, never repository content.
Canonical target
The Backup domain owns:
- critical-store backup inventory and ownership;
- data criticality plus RPO/RTO;
- backup cadence, retention, encryption and off-site/geographic policy;
- machine-readable backup manifests carrying source/snapshot/time/size/checksum/encryption/
destination metadata;
- canonical backup orchestration and integrity verification;
- restore tooling/runbooks and isolated restore/disaster-recovery drills;
- backup freshness/restore-readiness evidence consumed by canonical Platform health;
- scheduler integration through the central LingEx scheduler rather than ad-hoc cron.
The deployment-migration contract defines one Core-resolved Backup provider for candidate-bound snapshots, isolated restore verification and deterministic recovery evidence. That contract does not add a migration runner or deployment operator.
Secret recovery must preserve the approved secret-store/encryption boundary. Raw secrets do not belong in ordinary manifests, Git or Work Tracker evidence.
Current implementation
The repository provides the policy/foundation boundary, the versioned deployment-migration recovery contract, and disposable-MariaDB-tested snapshot-capture, isolated-restore and candidate-bound evidence primitives. lingex-module.php declares the recovery provider and a Core v3 contextual factory. That factory uses the typed Platform runtime-adapter service and resolves Persistence targets through Core. Platform supplies source authorization, candidate/fence, target verification/capacity and storage/capacity adapters. Existing- data encryption requires the separate Backup production affected-data protection interface, whose authenticated purpose context binds the exact candidate, source, plan, affected closure, schema, ledger, policy and isolated restore target. Existing-data restores use the separate migration-restore-verification target; the existing migration-rehearsal target remains synthetic-only. Backup passes the sealed manifest's exact binding and bounded capacity request to Persistence and holds its lease through restore/readback. Generic or synthetic encryption is never substituted for this purpose; missing or incompatible providers and unsafe/missing adapters fail closed. The module declaration and synthetic Core lookup fixture are implemented. Platform 072ad6b implements the optional purpose-specific key-file profile, but source support does not establish that its owner-approved private configuration is provisioned or active; live production snapshot protection and recovery are not established. Scheduled off-site backup remains separate work.
The separate clean restore-verification target uses Persistence contract lingex.persistence.migration-restore-verification-target@1.0.0. Live acquisition remains closed until its private manifest, schema-scoped credential and fresh capacity report are provisioned and the approved non-synthetic key source is configured. The accepted architecture uses a dedicated logical schema on the existing MariaDB service; it does not require a second database server. Missing providers never enable the synthetic path.
That implementation state does not narrow the canonical target above. Existing deployment backup artifacts under the server backup root are not silently treated as proof of complete estate recoverability.
Writable-state boundary
Sealed snapshots and temporary artifact staging (encrypted when required by policy) belong beneath $HOME/lingex/backups/. Deployment snapshot locks and transient operation indexes belong under $HOME/lingex/runtime/backup-deployment-recovery/; they contain no payload data. The staging directory remains within the Backup root because final sealing uses an atomic same-filesystem rename. The producer refuses if it cannot verify the same filesystem and storage/quota boundary; it never falls back to a cross-filesystem copy. Logs/evidence belong under $HOME/lingex/logs/. Repository and sealed release trees stay read-only.
Verification
bash scripts/verify-repo-shape.sh
bash scripts/check-architecture.sh
git diff --check