fix(metrics): seed an empty replica from the offsite backup #43
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/vm-restore"
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?
victoriametrics-1moved tohcloud-volumesand started empty, as designed. Each replica keeps its own 14 days, vmagent dual-writes by pod DNS name, and vmsingle has no peer repair, so a replaced replica only fills forward.Why not vmctl. Copying the window with
vmctl vm-nativeworks but is far too slow: 8619 export requests against a server running--search.maxConcurrentRequests=2, measured at about five hours. Raising--vm-concurrencyabove 1 immediately 429s, because the copy and ordinary Grafana queries share those same two slots. Raising the servers limit would mean two more releases and would degrade queries while it ran.vmrestore instead. It pulls the same window as one bulk transfer from Hetzner Object Storage in minutes, and never queries the serving replica. The backup already exists: the sidecar wrote 18.8 GB for
victoriametrics-0at 16:48 today.The initContainer runs only when
/storageholds no data, so it is inert on every normal restart and cannot touch a replica that already has data.The source is
victoriametrics-0by name rather than${POD_NAME}, because the point is to seed a replica whose own backup is gone. vmbackup makes S3 match local every 6h, so an emptied replicas own backup is emptied with it. That already happened tovictoriametrics-1at 20:20 today, deleting 13.9 GB. Worth knowing before anyone swaps replica 0.Temporary. It should be removed once both replicas are on
hcloud-volumesand populated, or replica 0s backup becomes a silent single point of truth.bash tests/check.shpasses.https://claude.ai/code/session_01MdSbMhzabSbpG8TtP9Ur3H