Day 12: Backup and DR – the off-site store
Goal: understand Qdrant snapshots and write them to an S3 off-site store outside the cluster, restore a fresh installation from it, measure RPO and RTO with a stopwatch, and distinguish Longhorn volume snapshots from them · Duration: about 150 min · Prerequisite: Day 0 to Day 11
State before this chapter
Three Qdrant pods are running with TLS, an API key, NetworkPolicies
and Pod Security restricted; the monitoring from Day 11 is
in place on vdb1.
# on vdb1
kubectl -n qdrant get pods -o wideExpected (your IPs, nodes and ages will differ):
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
qdrant-0 1/1 Running 0 88m 10.42.1.56 vdb2 <none> <none>
qdrant-1 1/1 Running 0 17m 10.42.3.6 vdb4 <none> <none>
qdrant-2 1/1 Running 0 90m 10.42.2.16 vdb3 <none> <none>
The three collections: doku (13,220 points × 768, one
shard with two copies), verteilt (13,220 points, three
shards with two copies each) and glove (1,183,514 points ×
100, three shards without a second copy). All commands
in this chapter run on vdb1 in the folder
~/labor/tag12:
# on vdb1
mkdir -p ~/labor/tag12
cd ~/labor/tag12Introduction
On Days 5 to 7 you built the library against failures: second copies in other branches, a council that decides by majority. That protects against a burned-down node. It does not protect against a librarian who accidentally clears out an entire holding – the deletion is replicated to all branches just as dutifully as every shelving. Nor does it protect against a cluster that is lost as a whole.
For that you need a copy outside the library, and – what most people forget – a practiced way back. Today you build both: an S3 off-site store on vdb1 that does not run in the Kubernetes cluster, Qdrant snapshots written directly there, and a new branch that is created from the off-site store. At the end you measure with a stopwatch how much data is lost (RPO) and how long the way back takes (RTO).
Three traps await you along the way: an inventory list that
disappears with the pod, a snapshot that reports “ok” and is still
empty, and a restore that reports green even though two
thirds of the books are missing.
Today you will learn:
- to create collection and shard snapshots and to recognize what exactly is in them,
- to set up and secure an S3 off-site store with SeaweedFS outside the cluster,
- to configure Qdrant so that snapshots land directly in the S3 bucket,
- to restore a fresh Qdrant installation from the off-site store – collection by collection and shard by shard,
- to measure RPO and RTO in a dress rehearsal,
- to classify Longhorn volume snapshots as a crash-consistent alternative.
Background
The picture of the day: inventory list and off-site store
Once every evening each branch takes inventory: it writes down which books are on its shelf sections and packs a complete copy of these shelf sections into boxes. Important: each branch only inventories its own shelves. If a shelf section is only in branch A, it is in none of branch B’s boxes.
If you leave the boxes in the branch’s basement, they are gone along with everything else in a water damage. That is why a delivery van takes the boxes to the off-site store on the edge of town (S3). The off-site store does not belong to the library, has its own key and only lets in suppliers with an ID card.
If a branch burns down, a new branch is opened: empty shelves, then unpack the boxes from the off-site store. Two questions decide whether that is enough: how many books have been added since the last inventory and are now lost? And how long does the branch stay closed?
The terms
| Term | Meaning | In the picture |
|---|---|---|
| collection snapshot | archive with all local shards of a collection on a peer, including index and configuration | inventory of one branch |
| shard snapshot | archive of exactly one shard, created on a peer that holds it | box of one shelf section |
| recover | load a snapshot into a collection or shard | unpack the boxes |
| snapshot storage | local (folder in the pod) or s3
(bucket) |
basement or off-site store |
| S3, bucket, object | object storage protocol, container, file in it | off-site store, warehouse, box |
| presigned URL | time-limited, signed link to an object | pickup slip |
| RPO | Recovery Point Objective: how much data may be lost at most | books since the last inventory |
| RTO | Recovery Time Objective: how long the restore may take at most | days the branch stays closed |
| crash-consistent | state as after a power cut – everything that was on the disk | photo of the basement |
| application-consistent | state that the application itself produced as complete | inventory list from the librarian |
| volume snapshot | point-in-time image of a Longhorn volume | photo of one branch’s basement |
Remember: Replication protects against the failure of a branch, a backup against the loss of the books. A backup that has never been restored is only a hope.
Drill 1: Inventory in your own basement
You create a snapshot the way Qdrant does it out of the box – locally – and look at where it ends up and how long it lives.
Step 1 – which pod is which peer? Snapshots carry
the peer ID in their name, pods have names like qdrant-0.
Ask each pod individually for its peer ID. You read the pod IPs from
kubectl get pods -o wide and insert them in
--resolve (as on Day 11).
# on vdb1, in ~/labor/tag12
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.56 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-0.qdrant-headless:6333/cluster | jq .result.peer_id
curl -sS --resolve qdrant-1.qdrant-headless:6333:10.42.3.6 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-1.qdrant-headless:6333/cluster | jq .result.peer_id
curl -sS --resolve qdrant-2.qdrant-headless:6333:10.42.2.16 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-2.qdrant-headless:6333/cluster | jq .result.peer_id--resolve <name>:6333:<ip>– sends the request to exactly this pod, and the certificate still matches.--cacert ../tag10/ca.crtandapi-key– seal and ID card from Day 10; management needs the admin key.jq .result.peer_id– only the peer ID from the response.
Expected (your IDs will differ):
121400021250061
857928665674298
1485700002748332
Note down the mapping: qdrant-0 = 1214…, qdrant-1 =
8579…, qdrant-2 = 1485….
Step 2 – where is doku? Ask
qdrant-2 for the distribution of the collection. (In my
run, qdrant-2 already had a new IP here; always take the current one
from kubectl get pods -o wide.)
# on vdb1
curl -sS --resolve qdrant-2.qdrant-headless:6333:10.42.2.18 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-2.qdrant-headless:6333/collections/doku/cluster -o doku-cluster.json# on vdb1
jq -c ".result | {peer_id, local_shards, remote_shards}" doku-cluster.jsonExpected:
{"peer_id":1485700002748332,"local_shards":[],"remote_shards":[{"shard_id":0,"peer_id":857928665674298,"state":"Active"},{"shard_id":0,"peer_id":121400021250061,"state":"Active"}]}
doku has a single shard with two copies – on qdrant-1
and qdrant-0. qdrant-2 holds nothing of it
(local_shards is empty). This becomes important in the
diagnosis task.
Step 3 – inventory on qdrant-0.
POST /collections/<name>/snapshots creates a
collection snapshot – on the peer that receives the request.
# on vdb1
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.56 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-0.qdrant-headless:6333/collections/doku/snapshots-X POST– creates a new snapshot; without parameters the request waits until it is finished.
Expected:
{"result":{"name":"doku-121400021250061-2026-12-06-02-15-21-0.snapshot","creation_time":"2026-12-06T02:15:27","size":109664256,"checksum":"d03be7cb92d1ce03384da8c322dd91b0e1d797d0be0e8fdaf6892fc549540a73"},"status":"ok","time":6.630664158}
| Field | Value | Meaning |
|---|---|---|
name |
doku-1214…-2026-12-06-02-15-21-0.snapshot |
collection, peer ID, point in time |
size |
109,664,256 | 105 MiB for 13,220 vectors × 768 plus index and payload |
checksum |
SHA-256 | verifies the archive when loading it |
time |
6.6 s | time taken to create it |
Step 4 – where is the box? Show the snapshot folder in the pod.
# on vdb1
kubectl -n qdrant exec qdrant-0 -- ls -la /qdrant/snapshots/dokuExpected:
total 107108
drwxr-sr-x 2 1000 3000 4096 Dec 6 02:15 .
drwxrwsrwx 4 root 3000 4096 Dec 6 02:15 ..
-rw------- 1 1000 3000 109664256 Dec 6 02:15 doku-121400021250061-2026-12-06-02-15-21-0.snapshot
-rw-r--r-- 1 1000 3000 64 Dec 6 02:15 doku-121400021250061-2026-12-06-02-15-21-0.snapshot.checksum
# on vdb1
kubectl -n qdrant exec qdrant-0 -- df -h /qdrant/snapshots /qdrant/storageExpected:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 77G 26G 51G 34% /qdrant/snapshots
/dev/longhorn/pvc-c6c96e89-073d-4b27-baae-13ed36b72ef8 3.9G 417M 3.5G 11% /qdrant/storage
/qdrant/snapshots is not on the Longhorn volume but on
/dev/sda1 – the system disk of the node vdb2. The chart
mounts an emptyDir there as long as
snapshotPersistence is off.
Step 5 – the branch moves. Delete the pod, as happens with every rollout or node change.
# on vdb1
kubectl -n qdrant delete pod qdrant-0# on vdb1
kubectl -n qdrant wait --for=condition=Ready pod/qdrant-0 --timeout=180sExpected:
pod "qdrant-0" deleted from qdrant namespace
pod/qdrant-0 condition met
The new pod has a new IP (here 10.42.1.59). Ask it for
its snapshots:
# on vdb1
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.59 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-0.qdrant-headless:6333/collections/doku/snapshotsExpected:
{"result":[],"status":"ok","time":0.000566465}
The inventory is gone. An emptyDir lives exactly as long
as the pod.
Remember: A snapshot in the pod is not a backup: it sits in the branch it is meant to protect, and with the default chart it disappears at the next restart.
Save your progress? Sign up for free
Drill 2: Building the off-site store
Which S3 storage?
MinIO, long the standard for self-hosted S3, has been archived since April 2026. Two maintained projects come into question (as of 6 December 2026):
| SeaweedFS | Garage | |
|---|---|---|
| Version | 4.56 from 30 November 2026, weekly releases | v2.6.0 |
| License | Apache-2.0 | AGPL-3.0 |
| Form | one Go program (weed) for amd64 and arm64 |
one Rust program, designed for geo-distributed nodes |
| Access rights | identities with per-bucket permissions in a JSON file | per-bucket keys via the command line |
The choice here falls on SeaweedFS: permissive license, a single program with an S3 interface, and per-bucket permissions that you can see as a file. Garage is a good choice if the off-site store is to be distributed across several locations.
The off-site store does not run in the Kubernetes cluster but as a systemd service directly on vdb1 with its own folder on the system disk. If the cluster fails along with Longhorn, it remains reachable. In production it belongs at a different location (see Enterprise note).
Step 1 – download the program.
dpkg --print-architecture returns amd64 or
arm64 – exactly the spelling used in the release files.
# on vdb1
ARCH=$(dpkg --print-architecture)# on vdb1
curl -fsSLO https://github.com/seaweedfs/seaweedfs/releases/download/4.56/linux_${ARCH}.tar.gz# on vdb1
curl -fsSLO https://github.com/seaweedfs/seaweedfs/releases/download/4.56/linux_${ARCH}.tar.gz.md5-f– abort on HTTP errors instead of saving an error page;-sSquiet, but show errors.-L– follow redirects (GitHub redirects downloads);-O– save under the name from the URL.
Step 2 – compare the checksum. The .md5
file contains only the sum, no file name – that is why you display both
and compare them by eye.
# on vdb1
cat linux_${ARCH}.tar.gz.md5
md5sum linux_${ARCH}.tar.gzExpected:
8ca21468313c7080dfd6f049f9fbba29
8ca21468313c7080dfd6f049f9fbba29 linux_amd64.tar.gz
Step 3 – unpack and install.
# on vdb1
tar xzf linux_${ARCH}.tar.gz# on vdb1
sudo install -m 0755 weed /usr/local/bin/weedinstall -m 0755– copies and sets the permissions in one step: everyone may execute, only root may change.
# on vdb1
weed versionExpected:
version 30GB 4.56 604d3910123912cf3e0e4208b0bd38f117373fa7 linux amd64
go: go1.27.4
30GB is the upper limit per data volume of this build
variant – more than enough.
Step 4 – a dedicated user and a dedicated folder. The service should not run as root.
# on vdb1
sudo useradd --system --no-create-home --shell /usr/sbin/nologin aussenlager--system– system account without an expiry date;--no-create-home– no home folder;--shell /usr/sbin/nologin– nobody can log in as this user.
# on vdb1
sudo install -d -o aussenlager -g aussenlager -m 0750 /srv/aussenlager# on vdb1
sudo install -d -m 0755 /etc/seaweedfsinstall -d– creates a folder,-o/-gowner and group,-mthe permissions.
Step 5 – generate two keys. Qdrant gets a key that may only write into one bucket; an administrator key creates buckets.
# on vdb1
openssl rand -hex -out s3-geheim-qdrant 20# on vdb1
openssl rand -hex -out s3-geheim-verwalter 20# on vdb1
chmod 600 s3-geheim-qdrant s3-geheim-verwalterStep 6 – the ID list. SeaweedFS reads identities
from a JSON file. For secretKey, insert the content of the
respective key file (cat s3-geheim-qdrant); the book shows
placeholders there.
# on vdb1
sudo nano /etc/seaweedfs/s3.json{
"identities": [
{
"name": "qdrant",
"credentials": [
{
"accessKey": "qdrant-sicherung",
"secretKey": "<INHALT VON s3-geheim-qdrant>"
}
],
"actions": [
"Read:qdrant-sicherung",
"Write:qdrant-sicherung",
"List:qdrant-sicherung",
"Tagging:qdrant-sicherung"
]
},
{
"name": "verwalter",
"credentials": [
{
"accessKey": "lager-verwalter",
"secretKey": "<INHALT VON s3-geheim-verwalter>"
}
],
"actions": [
"Admin"
]
}
]
}| Item | Value | Meaning |
|---|---|---|
accessKey |
qdrant-sicherung |
the “user name” – not secret |
secretKey |
content of the key file | the secret with which every request is signed |
actions |
Read:qdrant-sicherung etc. |
permissions, restricted to the bucket
qdrant-sicherung |
Admin |
without a bucket | may do everything, including creating buckets – only for the administrator |
The file contains secrets; only root and the service should read it:
# on vdb1
sudo chown root:aussenlager /etc/seaweedfs/s3.json# on vdb1
sudo chmod 0640 /etc/seaweedfs/s3.jsonStep 7 – the service. A systemd unit starts
weed server with an S3 interface.
# on vdb1
sudo nano /etc/systemd/system/aussenlager.service[Unit]
Description=Aussenlager: SeaweedFS mit S3-Schnittstelle
After=network-online.target
Wants=network-online.target
[Service]
User=aussenlager
Group=aussenlager
ExecStart=/usr/local/bin/weed server -dir=/srv/aussenlager -ip=172.16.0.182 -ip.bind=172.16.0.182 -master.volumeSizeLimitMB=1024 -volume.max=0 -s3 -s3.port=8333 -s3.config=/etc/seaweedfs/s3.json
Restart=on-failure
[Install]
WantedBy=multi-user.target| Item | Value | Meaning |
|---|---|---|
weed server |
starts master, volume server and filer in one process | |
-dir |
/srv/aussenlager |
where the data is written |
-ip / -ip.bind |
172.16.0.182 |
the address under which the parts register and listen |
-master.volumeSizeLimitMB |
1024 |
data volumes of 1 GiB each instead of 30 GB |
-volume.max |
0 |
determine the number of data volumes by free space |
-s3, -s3.port |
8333 |
turn on the S3 interface on port 8333 |
-s3.config |
/etc/seaweedfs/s3.json |
the ID list |
Restart=on-failure |
restart after a crash |
# on vdb1
sudo systemctl daemon-reload# on vdb1
sudo systemctl enable --now aussenlagerenable– start at boot;--now– also start immediately.
# on vdb1
systemctl status aussenlager --no-pagerExpected (excerpt):
● aussenlager.service - Aussenlager: SeaweedFS mit S3-Schnittstelle
Loaded: loaded (/etc/systemd/system/aussenlager.service; enabled; preset: enabled)
Active: active (running) since Sun 2026-12-06 02:18:45 UTC; 8s ago
Main PID: 2553262 (weed)
Memory: 31.8M (peak: 32.9M)
Dec 06 02:18:47 vdb1 weed[2553262]: I1206 02:18:47.934845 s3.go:599 Start Seaweed S3 API Server 30GB 4.56 604d3910123912cf3e0e4208b0bd38f117373fa7 at http port 8333
Dec 06 02:18:47 vdb1 weed[2553262]: I1206 02:18:47.957049 master_client.go:27 the cluster has 0 filers
“the cluster has 0 filers” repeats for a few seconds until the filer has started – not an error.
Step 8 – an S3 tool for the workbench. The AWS command line talks to any S3 storage.
# on vdb1
~/werkbank/bin/pip install --quiet awscli# on vdb1
~/werkbank/bin/aws --versionExpected:
aws-cli/1.46.3 Python/3.12.3 Linux/6.8.0-151-generic botocore/1.43.62
Two profiles – administrator and Qdrant – with the address of the off-site store:
# on vdb1
mkdir -p ~/.aws# on vdb1
nano ~/.aws/config[profile verwalter]
region = us-east-1
endpoint_url = http://172.16.0.182:8333
[profile qdrant]
region = us-east-1
endpoint_url = http://172.16.0.182:8333region– SeaweedFS ignores it, but the signature needs one;us-east-1is the usual value.endpoint_url– the off-site store instead of Amazon.
# on vdb1
nano ~/.aws/credentials[verwalter]
aws_access_key_id = lager-verwalter
aws_secret_access_key = <INHALT VON s3-geheim-verwalter>
[qdrant]
aws_access_key_id = qdrant-sicherung
aws_secret_access_key = <INHALT VON s3-geheim-qdrant># on vdb1
chmod 600 ~/.aws/credentialsStep 9 – create the warehouse.
# on vdb1
~/werkbank/bin/aws --profile verwalter s3 mb s3://qdrant-sicherung--profile verwalter– section from~/.aws/configandcredentials;s3 mb– “make bucket”.
Expected:
make_bucket: qdrant-sicherung
Step 10 – does the restriction hold? The Qdrant key may not create another bucket …
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 mb s3://fremdes-lagerExpected:
make_bucket failed: s3://fremdes-lager An error occurred (AccessDenied) when calling the CreateBucket operation: Access Denied.
… but it may write into its own. A small test file is enough:
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 cp /etc/hostname s3://qdrant-sicherung/probe/hostname# on vdb1
~/werkbank/bin/aws --profile qdrant s3 ls --recursive s3://qdrant-sicherung/Expected:
2026-12-06 02:20:32 5 probe/hostname
Step 11 – who else is listening?
weed server starts more than the S3 interface.
# on vdb1
sudo ss -ltnp | grep weedExpected (columns truncated on the right):
LISTEN 0 4096 172.16.0.182:8080 0.0.0.0:* users:(("weed",pid=2553262,fd=59))
LISTEN 0 4096 172.16.0.182:8181 0.0.0.0:* users:(("weed",pid=2553262,fd=69))
LISTEN 0 4096 172.16.0.182:19333 0.0.0.0:* users:(("weed",pid=2553262,fd=9))
LISTEN 0 4096 172.16.0.182:18888 0.0.0.0:* users:(("weed",pid=2553262,fd=48))
LISTEN 0 4096 172.16.0.182:9101 0.0.0.0:* users:(("weed",pid=2553262,fd=61))
LISTEN 0 4096 172.16.0.182:8888 0.0.0.0:* users:(("weed",pid=2553262,fd=47))
LISTEN 0 4096 172.16.0.182:8333 0.0.0.0:* users:(("weed",pid=2553262,fd=70))
LISTEN 0 4096 172.16.0.182:18333 0.0.0.0:* users:(("weed",pid=2553262,fd=72))
LISTEN 0 4096 172.16.0.182:18080 0.0.0.0:* users:(("weed",pid=2553262,fd=56))
LISTEN 0 4096 172.16.0.182:9333 0.0.0.0:* users:(("weed",pid=2553262,fd=8))
Ten open ports on the network. 8888 is the filer – the part that manages the files. It knows no S3 ID cards:
# on vdb1
curl -sS http://172.16.0.182:8888/buckets/qdrant-sicherung/probe/hostnameExpected:
vdb1
Anyone on the network can read any box – past the gatekeeper through
the suppliers’ entrance. So: master, volume server and filer only on
127.0.0.1, the S3 interface alone on the network, and the
two additional services (8181 Iceberg catalog, 9101 Lance) off. Change
line 9:
# on vdb1
sudo nano /etc/systemd/system/aussenlager.service[Unit]
Description=Aussenlager: SeaweedFS mit S3-Schnittstelle
After=network-online.target
Wants=network-online.target
[Service]
User=aussenlager
Group=aussenlager
ExecStart=/usr/local/bin/weed server -dir=/srv/aussenlager -ip=127.0.0.1 -ip.bind=127.0.0.1 -s3.ip.bind=172.16.0.182 -s3.port.iceberg=0 -s3.port.lance=0 -master.volumeSizeLimitMB=1024 -volume.max=0 -s3 -s3.port=8333 -s3.config=/etc/seaweedfs/s3.json
Restart=on-failure
[Install]
WantedBy=multi-user.target| Item | Value | Meaning |
|---|---|---|
-ip / -ip.bind |
127.0.0.1 |
master, volume server, filer only local |
-s3.ip.bind |
172.16.0.182 |
only the S3 interface listens on the network |
-s3.port.iceberg, -s3.port.lance |
0 |
additional services off |
# on vdb1
sudo systemctl daemon-reload# on vdb1
sudo systemctl restart aussenlager# on vdb1
sudo ss -ltnp | grep weedExpected (columns truncated on the right):
LISTEN 0 4096 127.0.0.1:19333 0.0.0.0:* users:(("weed",pid=2558164,fd=9))
LISTEN 0 4096 127.0.0.1:18888 0.0.0.0:* users:(("weed",pid=2558164,fd=57))
LISTEN 0 4096 127.0.0.1:8888 0.0.0.0:* users:(("weed",pid=2558164,fd=56))
LISTEN 0 4096 127.0.0.1:18080 0.0.0.0:* users:(("weed",pid=2558164,fd=81))
LISTEN 0 4096 127.0.0.1:9333 0.0.0.0:* users:(("weed",pid=2558164,fd=8))
LISTEN 0 4096 127.0.0.1:8080 0.0.0.0:* users:(("weed",pid=2558164,fd=83))
LISTEN 0 4096 172.16.0.182:8333 0.0.0.0:* users:(("weed",pid=2558164,fd=85))
LISTEN 0 4096 172.16.0.182:18333 0.0.0.0:* users:(("weed",pid=2558164,fd=88))
On the network, 8333 (S3) and 18333 (gRPC port of the S3 interface) remain. The suppliers’ entrance is closed:
# on vdb1
curl -sS -m 5 http://172.16.0.182:8888/buckets/qdrant-sicherung/probe/hostnameExpected:
curl: (7) Failed to connect to 172.16.0.182 port 8888 after 1 ms: Couldn't connect to server
And with an ID card things continue – the test file has survived the restart:
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 ls --recursive s3://qdrant-sicherung/Expected:
2026-12-06 02:20:32 5 probe/hostname
Remember: An off-site store with a key at the main gate and an open suppliers’ entrance is no off-site store. Check with
ss -ltnpwhat is really listening – not just what you turned on.
Save your progress? Sign up for free
Drill 3: The branches deliver to the off-site store
Qdrant can write snapshots to S3 itself
(snapshots_storage: s3). Fields missing from the
configuration it takes from the usual AWS_* environment
variables. So the credentials go into a Secret, the rest into the Helm
values.
Step 1 – the Secret.
# on vdb1
kubectl -n qdrant create secret generic qdrant-s3 --from-literal=zugang=qdrant-sicherung --from-file=geheim=s3-geheim-qdrant--from-literal=zugang=…– keyzugangwith the given value.--from-file=geheim=<datei>– keygeheimwith the content of the file.
Expected:
secret/qdrant-s3 created
Step 2 – an additional file for the Helm values.
Instead of printing the long values file from Day 10 once more, the
change goes into its own small file. Helm merges several -f
files from left to right.
# on vdb1
nano sicherung-werte.yaml# Zusatz zu ../tag10/qdrant-werte.yaml: Snapshots ins Außenlager (S3)
config:
storage:
snapshots_config:
snapshots_storage: s3
s3_config:
bucket: qdrant-sicherung
region: us-east-1
endpoint_url: http://172.16.0.182:8333
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: qdrant-s3
key: zugang
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: qdrant-s3
key: geheim| Item | Value | Meaning |
|---|---|---|
snapshots_storage |
s3 |
snapshots not into the pod folder but into the bucket |
bucket, region,
endpoint_url |
as in ~/.aws/config |
|
env |
AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY |
credentials from the Secret, not in plain text in the configuration |
Step 3 – roll out.
# on vdb1
helm upgrade qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f ../tag10/qdrant-werte.yaml -f sicherung-werte.yamlExpected (excerpt):
Release "qdrant" has been upgraded. Happy Helming!
NAME: qdrant
LAST DEPLOYED: Sun Dec 6 02:22:55 2026
NAMESPACE: qdrant
STATUS: deployed
REVISION: 21
# on vdb1
kubectl -n qdrant rollout status statefulset/qdrant --timeout=600sExpected (excerpt, after a good two and a half minutes):
Waiting for partitioned roll out to finish: 1 out of 3 new pods have been updated...
Waiting for partitioned roll out to finish: 2 out of 3 new pods have been updated...
partitioned roll out complete: 3 new pods have been updated...
Step 4 – the first delivery. Read the new IP of
qdrant-0 (kubectl -n qdrant get pods -o wide) and create a
snapshot of doku again.
# on vdb1
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.60 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-0.qdrant-headless:6333/collections/doku/snapshotsExpected (excerpt, one line, wrapped here):
{"status":{"error":"Service internal error: failed to store snapshot archive to /qdrant/./storage/tmp/doku-121400021250061-2026-12-06-02-25-43-0.snapshot-arc-RQaMr8:
... 403 Forbidden: ... <Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message> ..."},"time":4.016841766}
Two things are in there. First, Qdrant builds the archive in
/qdrant/storage/tmp – that is, on the Longhorn volume – and
then uploads it. The volume needs room for the largest snapshot. Second,
the signature does not match. The off-site store calculates with a
different key than Qdrant.
Step 5 – an old acquaintance. Count the characters of the key file.
# on vdb1
wc -c s3-geheim-qdrantExpected:
41 s3-geheim-qdrant
20 bytes in hexadecimal are 40 characters. The 41st is the line break
that openssl rand -out appends – as on Day 11 with the
Prometheus Secret. In the environment variable it becomes part of the
key. In s3.json and in ~/.aws/credentials the
key has no line break, which is why the AWS command line worked.
# on vdb1
tr -d "\n" < s3-geheim-qdrant > s3-geheim-qdrant.einzeilig# on vdb1
wc -c s3-geheim-qdrant.einzeiligExpected:
40 s3-geheim-qdrant.einzeilig
# on vdb1
kubectl -n qdrant delete secret qdrant-s3# on vdb1
kubectl -n qdrant create secret generic qdrant-s3 --from-literal=zugang=qdrant-sicherung --from-file=geheim=s3-geheim-qdrant.einzeiligA container reads environment variables only at startup. So restart:
# on vdb1
kubectl -n qdrant rollout restart statefulset/qdrant# on vdb1
kubectl -n qdrant rollout status statefulset/qdrant --timeout=600sExpected: again
partitioned roll out complete: 3 new pods have been updated...,
here after 2:33 min.
Step 6 – second attempt (read the new IP of qdrant-0):
# on vdb1
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.61 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-0.qdrant-headless:6333/collections/doku/snapshotsExpected:
{"result":{"name":"doku-121400021250061-2026-12-06-02-28-41-0.snapshot","creation_time":"2026-12-06T02:28:48","size":109664256},"status":"ok","time":7.016776951}
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 ls --recursive s3://qdrant-sicherung/Expected:
2026-12-06 02:20:32 5 probe/hostname
2026-12-06 02:28:48 109664256 snapshots/doku/doku-121400021250061-2026-12-06-02-28-41-0.snapshot
The box is in the off-site store under
snapshots/<collection>/.
Step 7 – operations continue. After the inventory, new books are added. Write five points with the script from Day 11 – they are your yardstick for the RPO.
# on vdb1
~/werkbank/bin/python ../tag11/schreiben.py https://10.43.151.237:6333 doku 950000 5Expected:
02:29:09 Punkt 950000: geschrieben
02:29:09 Punkt 950001: geschrieben
02:29:09 Punkt 950002: geschrieben
02:29:09 Punkt 950003: geschrieben
02:29:09 Punkt 950004: geschrieben
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/lese-key)" -H "Content-Type: application/json" -X POST https://10.43.151.237:6333/collections/doku/points/count -d "{\"exact\":true}"Expected:
{"result":{"count":13225},"status":"ok","time":0.010422981}
Production: 13,225 points. In the off-site store: the state from 02:28:48 with 13,220.
Remember: Qdrant writes snapshots directly to S3 when
snapshots_storage: s3is set. The credentials belong in a Secret – and with S3, a line break in the key meansSignatureDoesNotMatch.
Save your progress? Sign up for free
Drill 4: Taking inventory of the whole library
doku is easy: one shard, and qdrant-0 holds a complete
copy. glove is distributed – three shards, each present
only once. Here you back up each shelf section
individually with a shard snapshot.
Step 1 – who holds which shard? Ask each pod for its
local shards (IPs from kubectl get pods -o wide):
# on vdb1
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.61 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-0.qdrant-headless:6333/collections/glove/cluster -o glove-cluster-0.json
curl -sS --resolve qdrant-1.qdrant-headless:6333:10.42.3.8 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-1.qdrant-headless:6333/collections/glove/cluster -o glove-cluster-1.json
curl -sS --resolve qdrant-2.qdrant-headless:6333:10.42.2.18 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://qdrant-2.qdrant-headless:6333/collections/glove/cluster -o glove-cluster-2.json# on vdb1
jq -c ".result.local_shards" glove-cluster-0.json
jq -c ".result.local_shards" glove-cluster-1.json
jq -c ".result.local_shards" glove-cluster-2.jsonExpected:
[{"shard_id":1,"points_count":424230,"state":"Active"}]
[{"shard_id":0,"points_count":367231,"state":"Active"}]
[{"shard_id":2,"points_count":392053,"state":"Active"}]
| Pod | Shard | Points |
|---|---|---|
| qdrant-0 | 1 | 424,230 |
| qdrant-1 | 0 | 367,231 |
| qdrant-2 | 2 | 392,053 |
Step 2 – pack three boxes.
POST /collections/<name>/shards/<id>/snapshots
– to the pod that holds the shard. The time before and after shows the
total duration.
# on vdb1
date +%T# on vdb1
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.61 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-0.qdrant-headless:6333/collections/glove/shards/1/snapshots# on vdb1
curl -sS --resolve qdrant-1.qdrant-headless:6333:10.42.3.8 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-1.qdrant-headless:6333/collections/glove/shards/0/snapshots# on vdb1
curl -sS --resolve qdrant-2.qdrant-headless:6333:10.42.2.18 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-2.qdrant-headless:6333/collections/glove/shards/2/snapshots# on vdb1
date +%TExpected (the outputs of the five commands one below the other):
02:29:43
{"result":{"name":"glove-shard-1-2026-12-06-02-29-43-1.snapshot","creation_time":"2026-12-06T02:29:53","size":251776000},"status":"ok","time":10.328877886}
{"result":{"name":"glove-shard-0-2026-12-06-02-29-54-0.snapshot","creation_time":"2026-12-06T02:30:05","size":217882112},"status":"ok","time":11.021410542}
{"result":{"name":"glove-shard-2-2026-12-06-02-30-06-0.snapshot","creation_time":"2026-12-06T02:30:16","size":232677888},"status":"ok","time":10.20547461}
02:30:17
A good 10 s per shard, 34 s for all three one after the other.
Step 3 – what is in the off-site store?
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 ls --recursive --human-readable --summarize s3://qdrant-sicherung/--human-readable– MiB instead of bytes;--summarize– total at the end.
Expected:
2026-12-06 02:20:32 5 Bytes probe/hostname
2026-12-06 02:28:48 104.6 MiB snapshots/doku/doku-121400021250061-2026-12-06-02-28-41-0.snapshot
2026-12-06 02:30:05 207.8 MiB snapshots/glove/shards/0/glove-shard-0-2026-12-06-02-29-54-0.snapshot
2026-12-06 02:29:53 240.1 MiB snapshots/glove/shards/1/glove-shard-1-2026-12-06-02-29-43-1.snapshot
2026-12-06 02:30:16 221.9 MiB snapshots/glove/shards/2/glove-shard-2-2026-12-06-02-30-06-0.snapshot
Total Objects: 5
Total Size: 774.4 MiB
670 MiB for glove – almost exactly the size that Day 9
measured on the volumes: vectors, int8 version and graph. A snapshot
contains the finished index, not just the raw data.
Step 4 – take the blueprint along. When loading, a shard snapshot needs a collection that already exists and is built the same way. Back up the configuration with:
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://10.43.151.237:6333/collections/glove -o glove-info.json# on vdb1
jq ".result.config | {params, hnsw_config, quantization_config}" glove-info.jsonExpected:
{
"params": {
"vectors": {
"size": 100,
"distance": "Cosine"
},
"shard_number": 3,
"replication_factor": 1,
"write_consistency_factor": 1,
"on_disk_payload": true
},
"hnsw_config": {
"m": 16,
"ef_construct": 100,
"full_scan_threshold": 10000,
"max_indexing_threads": 0,
"on_disk": false
},
"quantization_config": {
"scalar": {
"type": "int8",
"quantile": 0.99,
"always_ram": true
}
}
}
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 cp glove-info.json s3://qdrant-sicherung/konfiguration/glove-info.jsonExpected (excerpt):
upload: ./glove-info.json to s3://qdrant-sicherung/konfiguration/glove-info.json
Remember: You back up a distributed collection shelf section by shelf section: one shard snapshot per shard, created where the shard lives – and the collection’s blueprint belongs in the off-site store too.
Save your progress? Sign up for free
Drill 5: Opening a new branch
Now the emergency on a small scale: a fresh Qdrant installation in its own namespace, only one pod, without TLS (the pattern from Day 10 applies here just the same, but costs space in the book). It knows the bucket, but not a single collection.
Step 1 – namespace and key.
# on vdb1
kubectl create namespace qdrant-dr# on vdb1
openssl rand -hex -out dr-key 32# on vdb1
chmod 600 dr-key# on vdb1
kubectl -n qdrant-dr create secret generic qdrant-dr-schluessel --from-literal=admin=$(cat dr-key)$(cat dr-key)– the shell cuts off the final line break; this way the key gets into the Secret cleanly, without an intermediate file.
# on vdb1
kubectl -n qdrant-dr create secret generic qdrant-s3 --from-literal=zugang=qdrant-sicherung --from-file=geheim=s3-geheim-qdrant.einzeiligExpected:
namespace/qdrant-dr created
secret/qdrant-dr-schluessel created
secret/qdrant-s3 created
Step 2 – the values of the new branch.
# on vdb1
nano dr-werte.yaml# Neue Filiale: frische Qdrant-Installation für den Restore-Test
image:
tag: v1.20.3
replicaCount: 1
nodeSelector:
kubernetes.io/hostname: vdb2
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
memory: 3Gi
persistence:
size: 5Gi
storageClassName: longhorn
apiKey:
valueFrom:
secretKeyRef:
name: qdrant-dr-schluessel
key: admin
config:
telemetry_disabled: true
storage:
snapshots_config:
snapshots_storage: s3
s3_config:
bucket: qdrant-sicherung
region: us-east-1
endpoint_url: http://172.16.0.182:8333
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: qdrant-s3
key: zugang
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: qdrant-s3
key: geheim| Item | Value | Meaning |
|---|---|---|
replicaCount |
1 |
one branch is enough for the test |
nodeSelector |
vdb2 |
the node with 8 vCPUs and 16 GB; vdb3 and vdb4 already carry Qdrant and monitoring |
limits.memory |
3Gi |
according to Day 9, glove needs a good 700 MiB, plus a
buffer |
persistence.size |
5Gi |
data plus room for the archive that is unpacked when loading |
snapshots_config |
as in production | the new branch knows the same off-site store |
The anti-affinity from Day 6 does not get in the way: it only applies to pods in the same namespace.
Step 3 – install.
# on vdb1
helm install qdrant-dr qdrant/qdrant --version 1.20.3 -n qdrant-dr -f dr-werte.yamlExpected (excerpt):
NAME: qdrant-dr
LAST DEPLOYED: Sun Dec 6 02:31:36 2026
NAMESPACE: qdrant-dr
STATUS: deployed
REVISION: 1
# on vdb1
kubectl -n qdrant-dr wait --for=condition=Ready pod/qdrant-dr-0 --timeout=300s# on vdb1
kubectl -n qdrant-dr get pods,svc -o wideExpected (excerpt):
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/qdrant-dr-0 1/1 Running 0 30s 10.42.1.62 vdb2 <none> <none>
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/qdrant-dr ClusterIP 10.43.90.230 <none> 6333/TCP,6334/TCP,6335/TCP 30s
Note the cluster IP – yours will differ.
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.90.230:6333/collectionsExpected:
{"result":{"collections":[]},"status":"ok","time":0.000062491}
Empty shelves.
Step 4 – unpacking, first attempt.
PUT /collections/<name>/snapshots/recover loads a
collection snapshot and creates the collection in the process. The
obvious choice: the S3 address.
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.90.230:6333/collections/doku/snapshots/recover -d "{\"location\":\"s3://qdrant-sicherung/snapshots/doku/doku-121400021250061-2026-12-06-02-28-41-0.snapshot\"}"Expected:
{"status":{"error":"Bad request: URL s3://qdrant-sicherung/snapshots/doku/doku-121400021250061-2026-12-06-02-28-41-0.snapshot with scheme s3 is not supported"},"time":0.047908432}
file:///qdrant/snapshots/doku/<name> fails too,
with “Snapshot file … does not exist” – there is nothing in the pod; the
snapshot is in the bucket, after all.
Qdrant 1.20.3 writes snapshots to S3, but when loading it only
fetches them via http(s):// or from a local file. The
solution is a pickup slip: a presigned URL that the
off-site store honors for a while without any further ID card.
Step 5 – the pickup slip.
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 presign s3://qdrant-sicherung/snapshots/doku/doku-121400021250061-2026-12-06-02-28-41-0.snapshot --expires-in 900 > doku-url.txts3 presign– generates a signed URL; it calculates locally and does not ask the off-site store.--expires-in 900– valid for 15 minutes. Whoever has the URL can pick up the box for that long – so keep it short and do not copy it into tickets.
# on vdb1
cut -c1-120 doku-url.txtcut -c1-120– only the first 120 characters; the signature does not belong on the screen.
Expected:
http://172.16.0.182:8333/qdrant-sicherung/snapshots/doku/doku-121400021250061-2026-12-06-02-28-41-0.snapshot?AWSAccessKe
Step 6 – unpacking, second attempt.
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.90.230:6333/collections/doku/snapshots/recover -d "{\"location\":\"$(cat doku-url.txt)\"}"Expected:
{"result":true,"status":"ok","time":4.360182188}
4.4 s for 105 MiB: download, verify, unpack.
Step 7 – are the holdings correct?
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X POST http://10.43.90.230:6333/collections/doku/points/count -d "{\"exact\":true}"Expected:
{"result":{"count":13220},"status":"ok","time":0.007161063}
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.90.230:6333/collections/doku -o doku-dr.json# on vdb1
jq -c ".result | {status, points_count, indexed_vectors_count, segments_count, shard_number: .config.params.shard_number, replication_factor: .config.params.replication_factor}" doku-dr.jsonExpected:
{"status":"green","points_count":13220,"indexed_vectors_count":13220,"segments_count":4,"shard_number":1,"replication_factor":2}
The index is ready immediately (indexed_vectors_count =
points); nothing needs to be rebuilt. replication_factor is
still 2 – the configuration comes from the snapshot, even though the new
branch has only one peer.
Step 8 – what is missing? Ask for the five points that were written after the inventory.
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X POST http://10.43.90.230:6333/collections/doku/points -d "{\"ids\":[950000,950004],\"with_payload\":true}"Expected:
{"result":[],"status":"ok","time":0.000682002}
Gone. That is the RPO in its purest form: everything between 02:28:48 (snapshot) and the outage is lost – here five points from 21 seconds. With one snapshot per night it would be up to 24 hours.
Step 9 – does the new branch find the same thing? A
search for the neighbors of point 2000, once in production, once in the
new branch. "query": 2000 searches with the vector of this
point.
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/lese-key)" -H "Content-Type: application/json" -X POST https://10.43.151.237:6333/collections/doku/points/query -d "{\"query\":2000,\"limit\":5}" -o suche-produktion.json# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X POST http://10.43.90.230:6333/collections/doku/points/query -d "{\"query\":2000,\"limit\":5}" -o suche-dr.json# on vdb1
jq -c "[.result.points[] | [.id, .score]]" suche-produktion.json
jq -c "[.result.points[] | [.id, .score]]" suche-dr.jsonExpected:
[[1999,0.8757371],[2004,0.84992456],[2003,0.8289543],[2011,0.827789],[1969,0.82733077]]
[[1999,0.8757371],[2004,0.84992456],[2003,0.8289543],[2011,0.827789],[1969,0.82733077]]
Same hits, same scores down to the last digit.
Remember: A restore is only finished when the point count, status and a sample search are correct. The points after the last inventory are missing – that is not an error, that is the RPO.
Save your progress? Sign up for free
Drill 6: Bringing back the distributed collection
Step 1 – the convenient way. Instead of three shard
snapshots, a single collection snapshot – on qdrant-1, just like with
doku:
# on vdb1
curl -sS --resolve qdrant-1.qdrant-headless:6333:10.42.3.8 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-1.qdrant-headless:6333/collections/glove/snapshotsExpected:
{"result":{"name":"glove-857928665674298-2026-12-06-02-30-37-1.snapshot","creation_time":"2026-12-06T02:30:55","size":277558784},"status":"ok","time":17.673369418}
265 MiB, status ok. Pickup slip and loading into the new
branch:
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 presign s3://qdrant-sicherung/snapshots/glove/glove-857928665674298-2026-12-06-02-30-37-1.snapshot --expires-in 900 > glove-url.txt# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.90.230:6333/collections/glove/snapshots/recover -d "{\"location\":\"$(cat glove-url.txt)\"}"Expected:
{"result":true,"status":"ok","time":8.835947244}
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X POST http://10.43.90.230:6333/collections/glove/points/count -d "{\"exact\":true}"Expected:
{"result":{"count":367231},"status":"ok","time":0.156863366}
367,231 instead of 1,183,514. Where is the rest?
Step 2 – look at the shelves.
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.90.230:6333/collections/glove/cluster -o glove-dr-cluster.json# on vdb1
jq -c "{lokal: [.result.local_shards[] | {shard_id, points_count, state}], fern: [.result.remote_shards[] | {shard_id, peer_id, state}]}" glove-dr-cluster.jsonExpected:
{"lokal":[{"shard_id":0,"points_count":367231,"state":"Active"},{"shard_id":1,"points_count":0,"state":"Active"},{"shard_id":2,"points_count":0,"state":"Active"}],"fern":[]}
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.90.230:6333/collections/glove | jq -c ".result | {status, points_count, shard_number: .config.params.shard_number}"Expected:
{"status":"green","points_count":367231,"shard_number":3}
The snapshot from qdrant-1 contains only its shard 0. The new branch created the collection with all three shards, shards 1 and 2 are empty – and the status is still green. A point from another shard is simply not there:
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X POST http://10.43.90.230:6333/collections/glove/points/query -d "{\"query\":500000,\"limit\":3}"Expected:
{"status":{"error":"Not found: No point with id 500000 found"},"time":0.000938466}
Monitoring that only looks at status would have noticed
nothing.
Step 3 – the right way: empty collection, then shard by shard. Delete the half-filled holdings:
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -X DELETE http://10.43.90.230:6333/collections/gloveExpected:
{"result":true,"status":"ok","time":0.209255764}
The blueprint from Drill 4 becomes the create command – only the fields you set yourself:
# on vdb1
nano glove-anlegen.json{
"vectors": {
"size": 100,
"distance": "Cosine"
},
"shard_number": 3,
"replication_factor": 1,
"on_disk_payload": true,
"hnsw_config": {
"m": 16,
"ef_construct": 100
},
"quantization_config": {
"scalar": {
"type": "int8",
"quantile": 0.99,
"always_ram": true
}
}
}The off-site store shows the names of the shard snapshots:
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 ls --recursive s3://qdrant-sicherung/snapshots/glove/shards/Expected:
2026-12-06 02:30:05 217882112 snapshots/glove/shards/0/glove-shard-0-2026-12-06-02-29-54-0.snapshot
2026-12-06 02:29:53 251776000 snapshots/glove/shards/1/glove-shard-1-2026-12-06-02-29-43-1.snapshot
2026-12-06 02:30:16 232677888 snapshots/glove/shards/2/glove-shard-2-2026-12-06-02-30-06-0.snapshot
Three pickup slips – one per command, take the names from the list:
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 presign s3://qdrant-sicherung/snapshots/glove/shards/0/glove-shard-0-2026-12-06-02-29-54-0.snapshot --expires-in 900 > shard-0-url.txt# on vdb1
~/werkbank/bin/aws --profile qdrant s3 presign s3://qdrant-sicherung/snapshots/glove/shards/1/glove-shard-1-2026-12-06-02-29-43-1.snapshot --expires-in 900 > shard-1-url.txt# on vdb1
~/werkbank/bin/aws --profile qdrant s3 presign s3://qdrant-sicherung/snapshots/glove/shards/2/glove-shard-2-2026-12-06-02-30-06-0.snapshot --expires-in 900 > shard-2-url.txtStep 4 – create and load.
# on vdb1
date +%T# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.90.230:6333/collections/glove -d @glove-anlegen.json-d @glove-anlegen.json– the content of the file is the request body.
PUT /collections/<name>/shards/<id>/snapshots/recover
loads a shard – into a collection that already exists:
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.90.230:6333/collections/glove/shards/0/snapshots/recover -d "{\"location\":\"$(cat shard-0-url.txt)\"}"# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.90.230:6333/collections/glove/shards/1/snapshots/recover -d "{\"location\":\"$(cat shard-1-url.txt)\"}"# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.90.230:6333/collections/glove/shards/2/snapshots/recover -d "{\"location\":\"$(cat shard-2-url.txt)\"}"# on vdb1
date +%TExpected (the outputs of the six commands one below the other):
02:34:32
{"result":true,"status":"ok","time":1.550381601}
{"result":true,"status":"ok","time":4.891796983}
{"result":true,"status":"ok","time":6.982588198}
{"result":true,"status":"ok","time":6.290975061}
02:34:55
Step 5 – check.
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.90.230:6333/collections/glove/cluster | jq -c "[.result.local_shards[] | {shard_id, points_count, state}]"Expected:
[{"shard_id":0,"points_count":367231,"state":"Active"},{"shard_id":1,"points_count":424230,"state":"Active"},{"shard_id":2,"points_count":392053,"state":"Active"}]
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.90.230:6333/collections/glove | jq -c ".result | {status, points_count, indexed_vectors_count, segments_count}"Expected:
{"status":"green","points_count":1183514,"indexed_vectors_count":1183514,"segments_count":6}
All 1,183,514 points, all indexed, in 23 seconds. For comparison:
loading glove on Day 8 took 197 s, and afterwards Qdrant
spent a good four more minutes building the index.
A sample check with point 500000, which was missing just now:
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/lese-key)" -H "Content-Type: application/json" -X POST https://10.43.151.237:6333/collections/glove/points/query -d "{\"query\":500000,\"limit\":5}" -o glove-produktion.json# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X POST http://10.43.90.230:6333/collections/glove/points/query -d "{\"query\":500000,\"limit\":5}" -o glove-dr.json# on vdb1
jq -c "[.result.points[] | [.id, .score]]" glove-produktion.json
jq -c "[.result.points[] | [.id, .score]]" glove-dr.jsonExpected:
[[1116516,0.6156864],[672757,0.58818054],[1177136,0.58670044],[169447,0.57209015],[592597,0.5707283]]
[[1116516,0.6156864],[672757,0.58818054],[1177136,0.58670044],[169447,0.57209015],[592597,0.5707283]]
Remember: A peer’s collection snapshot is the inventory of one branch. A distributed collection comes back shard by shard – and
greenonly means “no work pending”, not “everything is there”.
Save your progress? Sign up for free
Drill 7: Dress rehearsal with a stopwatch
So far you have been reading, puzzling and looking things up in between. An RTO is measured in one go: branch gone, clock on, all the steps from above in one pass, clock off.
Step 1 – the new branch burns down.
# on vdb1
helm uninstall qdrant-dr -n qdrant-dr# on vdb1
kubectl -n qdrant-dr delete pvc qdrant-storage-qdrant-dr-0Expected:
release "qdrant-dr" uninstalled
persistentvolumeclaim "qdrant-storage-qdrant-dr-0" deleted from qdrant-dr namespace
The namespace and Secrets remain – they belong to the preparation, not to the restore.
Step 2 – clock on, everything in one pass. You know
all the commands; only the cluster IP of the new installation is new
(here 10.43.176.102), and you issue new pickup slips
because the old ones expired after 15 minutes.
| Time | Step | Result |
|---|---|---|
| 02:35:45 | date +%T, then
helm install qdrant-dr … -f dr-werte.yaml |
installed |
| 02:36:10 | kubectl -n qdrant-dr wait … met,
get svc |
cluster IP 10.43.176.102 |
s3 presign for doku,
recover |
"time":4.849177198 |
|
PUT /collections/glove -d @glove-anlegen.json |
"time":1.86668496 |
|
s3 presign and shard recover for 0, 1,
2 |
5.696…, 6.627…, 6.119… |
|
count for glove and doku |
1,183,514 and 13,220 | |
| 02:36:57 | date +%T |
done |
The table summarizes the outputs; the raw outputs are the same JSON lines as in Drills 5 and 6.
Afterwards:
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.176.102:6333/collections/glove | jq -c ".result | {status, points_count, indexed_vectors_count}"Expected:
{"status":"green","points_count":1183514,"indexed_vectors_count":1183514}
# on vdb1
kubectl -n qdrant-dr exec qdrant-dr-0 -- df -h /qdrant/storageExpected:
Defaulted container "qdrant" out of: qdrant, ensure-dir-ownership (init)
Filesystem Size Used Avail Use% Mounted on
/dev/longhorn/pvc-29b2ea11-26c7-4175-ad92-15946ece9ede 4.9G 776M 4.1G 16% /qdrant/storage
Step 3 – the numbers.
| Measure | Value |
|---|---|
| Data | doku 13,220 × 768 (105 MiB snapshot) +
glove 1,183,514 × 100 (670 MiB in three shard
snapshots) |
| Environment | one pod on vdb2 (8 vCPUs, 16 GB), Longhorn with 3 copies, off-site store on vdb1 in the same network |
| RTO measured | 72 s from helm install to the last
count, 25 s of that until the pod is ready |
| RPO measured | gap to the last snapshot: 5 points from 21 s are missing |
| Creating snapshots | doku 7 s, glove 34 s for three shards one
after the other |
These 72 seconds apply to this lab. They grow with the amount of data and do not shrink with faster nodes if the network to the off-site store is the bottleneck. And they do not include the time until someone notices that something is missing and decides to reopen the branch – in real incidents usually the largest part.
Remember: RPO is determined by the interval between inventories, RTO by the size of the boxes and a practiced procedure. You only know either once you have measured it with the clock.
Save your progress? Sign up for free
Drill 8: The photo of the basement – Longhorn snapshots
Longhorn can freeze any volume in one second. Why then all the effort with Qdrant snapshots?
Step 1 – which volume belongs to qdrant-0?
# on vdb1
kubectl -n qdrant get pvc qdrant-storage-qdrant-0 -o jsonpath="{.spec.volumeName}{\"\n\"}"Expected:
pvc-c6c96e89-073d-4b27-baae-13ed36b72ef8
Step 2 – a snapshot of the volume.
# on vdb1
nano volume-snapshot.yamlapiVersion: longhorn.io/v1beta2
kind: Snapshot
metadata:
name: inventur-qdrant-0
namespace: longhorn-system
spec:
volume: pvc-c6c96e89-073d-4b27-baae-13ed36b72ef8
createSnapshot: truespec.volume– the Longhorn volume from Step 1;createSnapshot: true– create it now.
# on vdb1
kubectl apply -f volume-snapshot.yaml# on vdb1
kubectl -n longhorn-system get snapshots.longhorn.io inventur-qdrant-0Expected:
NAME VOLUME CREATIONTIME READYTOUSE RESTORESIZE SIZE AGE
inventur-qdrant-0 pvc-c6c96e89-073d-4b27-baae-13ed36b72ef8 2026-12-06T02:38:48Z true 4294967296 308891648 12s
Done one second after the apply, 295 MiB, while Qdrant
keeps running.
Step 3 – what is on it? The snapshot is crash-consistent: exactly what was on the disk at the moment of the photo – as after a power cut. Qdrant is built for that (the accession register, the WAL, is replayed at startup), but four things make it weak as a backup:
- It applies to one volume, that is, one peer. The three volumes are photographed one after the other, never at the same moment.
- It contains the Raft state of this peer. If you restore only it, the branch believes it is earlier than it is – the council has moved on in the meantime, and the copy has to be transferred anew anyway.
- It sits on the same Longhorn replicas as the volume itself. Without
a backup target (
backuptargets, also an S3), it is no off-site store. - It only helps Kubernetes installations with Longhorn; a Qdrant snapshot can be loaded into any Qdrant installation.
It is good for the moment before a risky intervention on a single node, together with a Qdrant snapshot as the actual backup.
Step 4 – clean up.
# on vdb1
kubectl -n longhorn-system delete snapshots.longhorn.io inventur-qdrant-0Expected:
snapshot.longhorn.io "inventur-qdrant-0" deleted from longhorn-system namespace
# on vdb1
kubectl -n longhorn-system get snapshots.longhorn.io inventur-qdrant-0 -o jsonpath="{.metadata.deletionTimestamp} markRemoved={.status.markRemoved} children={.status.children}{\"\n\"}"Expected:
2026-12-06T02:39:07Z markRemoved=true children={"volume-head":true}
The entry remains, “marked for deletion”. Its only child is the
running volume (volume-head), and Longhorn merges it only
with the next snapshot – the same behavior that held on to space on the
volumes on Day 3.
Remember: A volume snapshot is a photo of one branch’s basement: fast, crash-consistent, but only one peer and not off-site. The inventory is done by the database itself.
Save your progress? Sign up for free
Diagnosis task: The backup is 7.5 KB
A colleague has built a nightly backup. It sends the snapshot command
for doku to the service – after all, the service spreads
the load. You call it five times:
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://10.43.151.237:6333/collections/doku/snapshotsExpected (five calls; your distribution will differ):
{"result":{"name":"doku-121400021250061-2026-12-06-02-37-15-2.snapshot","creation_time":"2026-12-06T02:37:20","size":109725696},"status":"ok","time":5.019260707}
{"result":{"name":"doku-1485700002748332-2026-12-06-02-37-33-1.snapshot","creation_time":"2026-12-06T02:37:33","size":7680},"status":"ok","time":0.099893618}
{"result":{"name":"doku-1485700002748332-2026-12-06-02-37-34-2.snapshot","creation_time":"2026-12-06T02:37:34","size":7680},"status":"ok","time":0.082577276}
{"result":{"name":"doku-1485700002748332-2026-12-06-02-37-40-3.snapshot","creation_time":"2026-12-06T02:37:41","size":7680},"status":"ok","time":0.098050637}
{"result":{"name":"doku-1485700002748332-2026-12-06-02-37-41-4.snapshot","creation_time":"2026-12-06T02:37:41","size":7680},"status":"ok","time":0.115394906}
All report ok. Load one of the small ones into the new
branch, under a test name:
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 presign s3://qdrant-sicherung/snapshots/doku/doku-1485700002748332-2026-12-06-02-37-33-1.snapshot --expires-in 900 > klein-url.txt# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -H "Content-Type: application/json" -X PUT http://10.43.176.102:6333/collections/doku-probe/snapshots/recover -d "{\"location\":\"$(cat klein-url.txt)\"}"# on vdb1
curl -sS -H "api-key: $(cat dr-key)" http://10.43.176.102:6333/collections/doku-probe | jq -c ".result | {status, points_count, shard_number: .config.params.shard_number}"Expected (the outputs of the two curl
commands):
{"result":true,"status":"ok","time":0.992071846}
{"status":"green","points_count":0,"shard_number":1}
Your task: why are four of the five backups empty
even though all report ok? How do you build the nightly
backup correctly, and how do you recognize an empty backup before you
need it?
Solution path:
- The peer ID in the name gives away the sender:
1485700002748332is qdrant-2 (Drill 1, Step 1). - According to
/collections/doku/cluster(Drill 1, Step 2), qdrant-2 has no local shard ofdoku. A collection snapshot contains only local shards – qdrant-2 packs the configuration and nothing else: 7,680 bytes. The service distributed the request randomly, four times to qdrant-2. - The right way: send the snapshot to a peer that holds the shard
(
--resolve), or – the same for every collection – create one shard snapshot per shard where/collections/<name>/clustershows the shard. - Check every backup: size against expectation (105 MiB, not 7.5 KB), and regularly load it into a test installation and count – exactly as here.
Clean up: with S3 as storage, every peer sees all snapshots in the bucket, including those of the others. Delete one via the API of qdrant-2:
# on vdb1
curl -sS --resolve qdrant-2.qdrant-headless:6333:10.42.2.18 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X DELETE https://qdrant-2.qdrant-headless:6333/collections/doku/snapshots/doku-1485700002748332-2026-12-06-02-37-33-1.snapshotExpected:
{"result":true,"status":"ok","time":0.071639236}
And the remaining three with a pattern directly in the off-site store:
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 rm s3://qdrant-sicherung/snapshots/doku/ --recursive --exclude "*" --include "doku-1485700002748332-*"--recursive– all objects under the prefix;--exclude "*"first excludes everything,--includethen takes back only the matching ones. The order matters.
Expected:
delete: s3://qdrant-sicherung/snapshots/doku/doku-1485700002748332-2026-12-06-02-37-34-2.snapshot
delete: s3://qdrant-sicherung/snapshots/doku/doku-1485700002748332-2026-12-06-02-37-40-3.snapshot
delete: s3://qdrant-sicherung/snapshots/doku/doku-1485700002748332-2026-12-06-02-37-41-4.snapshot
# on vdb1
curl -sS -H "api-key: $(cat dr-key)" -X DELETE http://10.43.176.102:6333/collections/doku-probeCheckpoint
First remove the test points from Drill 3 from production:
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -H "Content-Type: application/json" -X POST "https://10.43.151.237:6333/collections/doku/points/delete?wait=true" -d "{\"points\":[950000,950001,950002,950003,950004]}"Expected:
{"result":{"operation_id":112,"status":"completed"},"status":"ok","time":0.017615057}
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/lese-key)" -H "Content-Type: application/json" -X POST https://10.43.151.237:6333/collections/doku/points/count -d "{\"exact\":true}"Expected:
{"result":{"count":13220},"status":"ok","time":0.011864278}
The off-site store lets nobody in without an ID card:
# on vdb1
~/werkbank/bin/aws --no-sign-request --endpoint-url http://172.16.0.182:8333 s3 ls s3://qdrant-sicherung/--no-sign-request– request without a signature, i.e. anonymous.
Expected:
An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied.
The new branch is torn down – Day 13 needs the space:
# on vdb1
helm uninstall qdrant-dr -n qdrant-dr# on vdb1
kubectl delete namespace qdrant-drExpected:
release "qdrant-dr" uninstalled
namespace "qdrant-dr" deleted
# on vdb1
kubectl -n longhorn-system get volumes.longhorn.io -o custom-columns=NAME:.metadata.name,STATE:.status.state,ROBUST:.status.robustnessExpected:
NAME STATE ROBUST
pvc-1be489ab-3891-4c08-b4b4-b3d91dac36d9 attached healthy
pvc-37095780-0d56-4966-a719-884783ff8977 attached healthy
pvc-c6c96e89-073d-4b27-baae-13ed36b72ef8 attached healthy
pvc-e760fa38-f3f3-446d-9edc-6453b63e6b61 attached healthy
The off-site store (1.1 GB under /srv/aussenlager) and
the snapshots in it remain in place for the following days;
systemctl is-active aussenlager reports
active.
Test yourself
- A snapshot call reports
"status":"ok"and"size":7680. What happened? - Why is a snapshot that Qdrant creates locally with the default chart not a backup?
dokuhas two copies in two branches. What do you need a backup for, then?- After loading a collection snapshot,
gloveisgreenbut has only a third of the points. Why, and how is it done correctly? - When snapshotting to S3, Qdrant reports
SignatureDoesNotMatch, while the AWS command line with the same key works. What do you check first? - Why don’t you simply restore the Longhorn snapshots of the three Qdrant volumes?
Answers:
- The request landed on a peer without a local shard of this collection (distributed randomly via the service). A collection snapshot contains only local shards, so only the configuration. Fix: send it to the peer with the shard or use shard snapshots, and check the size as well as the restore.
- It lives in an
emptyDiron the node’s disk – in the same branch it is meant to protect – and disappears with the next restart of the pod. Only a target outside (S3) turns it into a backup. - Replication copies errors too: an accidental deletion is immediately in both copies. Against operator errors, software bugs and the loss of the whole cluster, only an off-site copy with older states helps.
- The collection snapshot comes from one peer and contains only its
shard. Qdrant creates the remaining shards empty, and
greenonly means “no optimization pending”. The right way: create an empty collection with the same configuration, then load each shard with its shard snapshot and count. - Whether the key in the Secret has a line break (
wc -con the file, 41 instead of 40 characters). In the environment variable it becomes part of the key; afterwards restart the pod, because environment variables are only read at startup. - They are crash-consistent and were created per volume at different points in time, each contains the Raft state of its peer, and without a backup target they sit on the same replicas as the data. They are useful for one peer before a risky intervention, but not as a backup of the database.
Interview note
“How do you back up a distributed Qdrant installation, and how do
you know the restore works?” – With snapshots that Qdrant writes
directly into an S3 bucket outside the cluster; the credentials come
from a Secret. For distributed collections I create one shard snapshot
per shard on the peer that holds the shard, because a collection
snapshot contains only the local shards – and reports ok
even when it is empty. I back up the collection configuration as well. I
practice the restore regularly into a fresh installation: create an
empty collection, load the shards via presigned URLs, compare the point
count and a sample search against production. That way I know my RTO –
72 seconds for 1.2 million vectors in the lab – and the RPO follows from
the snapshot interval. For me, Longhorn volume snapshots are only an
extra before risky interventions.
Enterprise note
In production, the off-site store sits at a different location or with a different provider, with Object Lock (WORM): once written, snapshots can be neither deleted nor overwritten for a set period – not even with the key from the cluster. This protects against ransomware and against a compromised account. On top of that come versioning, a lifecycle rule that removes old snapshots after the retention period, and TLS to the off-site store. The write key in the cluster may write but not delete; cleanup is done with a different account.
The snapshots run as a CronJob or from the platform’s backup tool, with an alert when a run is missing or a snapshot is smaller than expected. For very large collections, the download is the bottleneck: load shards in parallel, keep the off-site store close to the cluster, and include the restore in capacity planning (the volume needs room for the data and the archive). If you do not want to run Qdrant yourself: Qdrant Cloud offers backups per cluster; Velero backs up Kubernetes objects and volumes, but does not replace the application-consistent snapshot of the database.
And the most important thing is not in the configuration: a runbook with exactly the steps from Drill 7, a fixed drill every quarter, and RPO/RTO targets agreed with the business – not derived from the technology.
Summary
- A local snapshot ends up in the
emptyDir/qdrant/snapshotson the node’s system disk and is gone after the pod is deleted. - SeaweedFS 4.56 (Apache-2.0) as a systemd service on vdb1, outside
the cluster. Identities in
s3.json:qdrantonly for the bucketqdrant-sicherung,verwalterwithAdmin. The filer on 8888 was readable without an ID card – with-ip=127.0.0.1and-s3.ip.bind, only S3 listens on the network. snapshots_storage: s3plusAWS_*from a Secret: snapshots directly into the off-site store. Line break in the key →SignatureDoesNotMatch. The archive is built in/qdrant/storage/tmpon the volume.doku: collection snapshot on qdrant-0, 105 MiB in 7 s.glove: three shard snapshots in 34 s, together 670 MiB with the finished index.- Loading only via
http(s)://or a local file –s3://is rejected, so presigned URLs with short validity. - A single peer’s collection snapshot of
glove:green, but 367,231 of 1,183,514 points. The right way: create an empty collection, load three shard snapshots – 23 s, indexed immediately, identical search hits. - Dress rehearsal: RTO 72 s for both collections into a fresh installation, RPO = gap to the last snapshot (5 points from 21 s were missing).
- Longhorn snapshot in 1 s, crash-consistent, only one volume; after deletion it stays marked until Longhorn merges it.
- Snapshot via the service: four times 7,680 bytes from a peer without
the shard, all
ok.
Commands at a glance
| Command | Purpose |
|---|---|
curl … -X POST …/collections/<c>/snapshots |
collection snapshot of this peer’s local shards |
curl … -X POST …/collections/<c>/shards/<id>/snapshots |
snapshot of a shard on the peer that holds it |
curl …/collections/<c>/snapshots |
list snapshots (with S3: all in the bucket) |
curl … -X DELETE …/collections/<c>/snapshots/<name> |
delete a snapshot |
curl … -X PUT …/collections/<c>/snapshots/recover -d '{"location":"<url>"}' |
create a collection from a snapshot |
curl … -X PUT …/collections/<c>/shards/<id>/snapshots/recover -d '{"location":"<url>"}' |
load a shard into an existing collection |
curl …/collections/<c>/cluster |
local and remote shards of a peer |
weed server -s3 -s3.config=<file> -ip=127.0.0.1 -s3.ip.bind=<ip> |
SeaweedFS with S3, only S3 on the network |
ss -ltnp |
listening ports with process |
aws --profile <p> s3 mb s3://<bucket> |
create a bucket |
aws --profile <p> s3 ls --recursive --human-readable --summarize s3://<bucket>/ |
contents with sizes and total |
aws --profile <p> s3 cp <file> s3://<bucket>/<key> |
upload a file |
aws --profile <p> s3 presign s3://<bucket>/<key> --expires-in 900 |
pickup slip for 15 minutes |
aws --profile <p> s3 rm s3://<bucket>/<prefix> --recursive --exclude "*" --include "<pattern>" |
delete objects by pattern |
aws --no-sign-request --endpoint-url <url> s3 ls s3://<bucket>/ |
check anonymous access |
kubectl rollout restart statefulset/<name> |
restart pods, e.g. for new environment variables |
kubectl apply -f <longhorn-snapshot>.yaml |
create a Longhorn volume snapshot |