feat(qdrant-backup-restore): per-shard backups with verified restores - #115
Open
ddakv wants to merge 7 commits into
Open
feat(qdrant-backup-restore): per-shard backups with verified restores#115ddakv wants to merge 7 commits into
ddakv wants to merge 7 commits into
Conversation
ddakv
force-pushed
the
feat/qdrant-per-shard-backup
branch
from
August 14, 2026 13:58
950307d to
fd66d1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The legacy backup snapshots every collection on every peer — with 3 nodes and RF 3 that's ~3× the logical data per run, with no retention: the bucket fills, backups fail, and no verified-restorable set exists.
This adds a per-shard mode to
qdrant_backup_recovery.sh(create_snap_shards,recover_snap_shards,prune_snap [--legacy]) plus a DR RUNBOOK and staged k8s cutover manifests. Legacy paths are frozen — deployments behave identically until the operator cuts over. Result per run: one snapshot per shard (≈1× logical data), retention-bounded usage, restores that end in hard verification.How it works
prune_snap --legacy= day-0 bucket unblock.optional: truesecrets) while args still run legacy; the RUNBOOK gates each step — day-0 prune → shadow run → restore canary → cutover. CI stamps commit provenance into the ConfigMap (byte-identity to the script is test-enforced).Review guide
Read top-down from the three
*_taskentrypoints; every decision routes through a small pure function (stdin→stdout, contract in its header). The frozen legacy zone (≤ line ~946) is diff-verifiably unchanged. Spend your attention on five spots: (1) restore pre-flight ordering (before state gate/FORCE), (2) the FORCE path + resume precedence, (3) the sweep's four guards, (4) manifest-last ordering, (5) the version gate. Every protective layer exists because we reproduced its failure live (e.g. Qdrant accepts corrupted snapshot archives — qdrant#3372 — so the tool verifies integrity itself).Guarantees & caveats
restore-job.yamlas shipped intentionally fails fast until the RUNBOOK's flip; cron0 0 */7 * 0actually fires ~9-10×/month (pre-existing, comment now truthful — cadence decision open).Testing
Evidence (test code in the stacked PR):
VERIFIED (points=3000/3000), plus a corruption negative leg failing the Job with the target untouched.