fix: use CSI snapshots for server backups
Build and publish Docker image / build-and-publish (push) Successful in 11s

This commit is contained in:
wfalkowski committed 2026-10-24 06:38:52 +00:00
1 parent 59afb2ed03
commit b8be6ad2fb
4 files changed
+443 -213

No files matched your search

+14
View File
@@ -51,6 +51,20 @@ Build the image locally with:
docker build -t anchorhost-backend:local .
```
## Longhorn backups
Server backups use Kubernetes CSI `VolumeSnapshot` resources. The cluster must have the matching snapshot CRDs and controller installed, plus the `longhorn-snapshot` `VolumeSnapshotClass` in [`k8s/longhorn-snapshot-class.yaml`](k8s/longhorn-snapshot-class.yaml). Keep the external-snapshotter CRD/controller release aligned with the CSI snapshotter sidecar bundled with Longhorn. For the current Longhorn 1.9.0 setup, that version is v8.2.0.
On a cluster that does not provide the snapshot CRDs, install the CRDs from the pinned external-snapshotter release and apply the class:
```bash
kubectl apply -k 'https://github.com/kubernetes-csi/external-snapshotter/client/config/crd?ref=v8.2.0'
kubectl apply -k 'https://github.com/kubernetes-csi/external-snapshotter/deploy/kubernetes/snapshot-controller?ref=v8.2.0'
kubectl apply -f k8s/longhorn-snapshot-class.yaml
```
The snapshot controller must also be running. Before upgrading Longhorn or the snapshotter, check the matching CRD/controller version in the Longhorn release documentation. A backup is only marked **Completed** after the CSI snapshot reports `readyToUse`; restores verify the snapshot and wait for Longhorn to finish restoring the volume before starting the server.
## Configuration
| Variable | Purpose |