Off-host backup mirror to BASEL #84
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#84
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Prod backups are mirrored nightly to the BASEL host over WireGuard (ADR 0015, operator standard with the dedicated-user improvement).
Scope
Extend the sidecar (Prod profile): rsync of the backup directory to
dorfteich-backup@BASEL:/home/RAID/BACKUPS/dorfteich-prod/after the local run, SSH key from a mounted secret, remote retention alignment, mirror outcome in status.json; document the BASEL-side setup (dedicated userdorfteich-backupwith home under/home/, authorized_keys, directory permissions) indeploy/backup-basel.mdfor execution with the repo owner — explicitly avoiding the Debianbackupsystem-user pitfalls noted in the operator's conventions.Acceptance criteria
Technical notes
Dependencies
Depends on #83.
Size: ~1 day
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Status: blocked — dieser Mirror braucht den WireGuard-Tunnel ONE→BASEL, der wegen des episodischen Inbound-Paketverlusts an der BASEL-Site (Analyse: Telekom-Policing bzw. Fritz!Box-7690-Verdacht, siehe Handoff-Wireguard.md) derzeit nicht stabil steht.
Der generische Off-Host-Backup-Bedarf für Selbst-Hoster wird stattdessen von #103 übernommen (admin-konfigurierbares Nextcloud-Ziel inkl. In-App-Restore). #84 bleibt als persönliches Zusatzziel offen: eine BASEL-Kopie lässt sich nach #103 wahlweise auch über eine Nextcloud auf BASEL abbilden — falls der rsync-Weg dann noch gebraucht wird, hier neu bewerten.
Implemented in
52192eb(+203f7c9go-live checklist tick) — unblocked by the tunnel fix, CI fully green, mirror is live on the Test stage.What shipped
mirror.ts), env-only configuration (operator territory, unlike the admin-configured Nextcloud target #103):BACKUP_MIRROR_TARGET(rsync-over-ssh),BACKUP_MIRROR_SSH_KEY(private key on the secrets volume, never in image or repo),BACKUP_MIRROR_SSH_PORT. rsync + openssh-client added to the sidecar image.--deletealigns the remote retention with the local one — the newest-complete-set guarantee carries over. Only set files travel (db-*.dump,files-*.tar.gz). Host key pinned viaaccept-newinto.mirror_known_hostson the backups volume; fixed remote modes (dirs 750, files 640).status.jsongained an additivemirrorblock (outcome, transferred count,lastSuccessAtcarried across failures) — shown on the admin backup card; failures alert via the newbackupMirrorFailedmail (de+en) while local backups continue.deploy/backup-basel.md: complete BASEL walkthrough — dedicated userdorfteich-backupwith a/home/home and a bash login shell (explicitly avoiding the Debianbackup/UID-34 pitfalls: nologin rejects rsync sessions,/var/backupshome), key placement through the api container,.envvalues, verification.Acceptance criteria
status.json+ alert mail while the local run stays succeeded (failure path exercised live during verification)Provisioned + verified
dorfteich-backup(uid 1001,/home/dorfteich-backup, bash), per-stage keys inauthorized_keys, target dirsdorfteich-test/dorfteich-prod(750)..env+ key installed, on-demand run green — the nightly sets (incl. last night's) now sit on BASEL,status.json → mirror.lastRun = succeeded..env, compose and key are already in place; the running v0.1.2 sidecar ignores the new vars, so the mirror activates automatically with the next release deploy — noted on the go-live checklist (verifystatus.json → mirrorafter the first prod deploy).Restore from the mirror = copy the set pair back into the backups volume +
./restore.sh <id>(runbook).