C1: fix borgmatic shower SQLite dump (ssh to ringtail) #357
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-borgmatic-shower-via-ssh"
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?
Summary
Nightly borgmatic backups have been failing for 2 days. Root cause: the
shower SQLite dump
before_backuphook (added in PR #349) referencedkubectl --context=k3s-ringtail, but indri's kubeconfig deliberatelydoesn't carry the ringtail credentials. The hook's failure aborted the
entire run, taking out both the local sifaka repo and the BorgBase
offsite. Verified the last good archive was
indri-2026-05-11T02:00.Approach
ssh into ringtail and run
k3s kubectlthere — no indri-sidekubeconfig needed.
/etc/rancher/k3s/k3s.yamlis mode 644 so no sudorequired, and the existing ssh access from indri to ringtail works.
Inline-shell quoting got hairy fast (fish on ringtail rejected
POD=...bash syntax; the nix shower image lacks
tarsokubectl cpfails).Pulled the dump logic into
~/bin/borgmatic-k8s-sqlite-dump, deployedby the ansible role. Each dump entry now declares a
target:local:<context>— local kubectl with explicit context (mealie)ssh:<user@host>— ssh +k3s kubectlon the cluster host (shower)Bytes come back via
kubectl exec ... -- catinstead ofkubectl cpsince
cpneedstarin the pod (nix-built containers don't bundle it).Test plan
mise run provision-indri -- --tags borgmatic --check --diffshows expected diff~/bin/borgmatic-k8s-sqlite-dumpssh:eblume@ringtailproduces a valid 288 KB SQLite fileborgmatic createcompletes without errors — both mealie.db (1.7 MB) and shower.db (288 KB) appear in~/.local/share/borgmatic/k8s-dumps/, archiveindri-2026-05-13T17:31:02written to sifaka borg repo🤖 Generated with Claude Code