perf(backup): upload to off-site destinations in parallel #148
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra!148
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "perf/backup-parallel-offsite"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Why
The #147 verification run showed the off-site phase uploads destinations sequentially — two ~7.6 GB uploads (glesys + hetzner) at ~15 min each ≈ 30 min serial. They're independent full copies of the same ciphertext to different providers, so they can run concurrently.
Change
roles/backup/templates/bitborg-backup.sh.j2— launch each destination'supload_toas a background job and collect exit statuses viawait. Off-site phase now ≈ the slowest destination (~15 min), not the sum.upload_tonowreturns its status (a background job can't set a parent var likeOFFSITE_FAILED); the parent maps PID→status and setsOFFSITE_FAILEDfromwait.:ro,Z→:ro,z: destinations mount${ARCHIVE}read-only concurrently, so the SELinux relabel must be shareable (:Zis private/per-container and would conflict). No-op on this AppArmor host; correct if SELinux is ever enabled.write_offsite_statusis file-based (works across subshells), local success stays independent of off-site,BackupOffsiteFailedstill fires per destination.Validation
wait/collect: statuses correctly attributed per destination (both-ok→0, one-fails→1, both-fail→1); two 1 s jobs finish in 1 s (concurrent, not 2 s).--check --diffrenders clean (0 failed),bash -non the rendered script.