Skip to content

Commit

Permalink
Merge pull request #1908 from umagnus/add_restore_doc
Browse files Browse the repository at this point in the history
doc: add smb restore snapshot doc
  • Loading branch information
andyzhangx authored Jun 12, 2024
2 parents e9118ba + 6bc8e59 commit 3ace0a6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
14 changes: 14 additions & 0 deletions deploy/example/snapshot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Azure File Snapshot feature

> NOTE: Due to [Azure File snapshot restore API limitation](https://github.com/kubernetes-sigs/azurefile-csi-driver/issues/136), this driver only supports snapshot creation, snapshot could be restored from Azure portal or cli.
> From version 1.30.2, you can restore smb fileshare snapshot by azure file CSI driver
## Install CSI Driver

Expand Down Expand Up @@ -53,5 +54,18 @@ Events: <none>
```
> In above example, `snapcontent-2b0ef334-4112-4c86-8360-079c625d5562` is the snapshot name
### 3. Create a new PVC based on snapshot
```console
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/snapshot/pvc-azurefile-snapshot-restored.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/snapshot/nginx-pod-restored-snapshot.yaml
```

- Check data
```console
$ kubectl exec nginx-restored -- ls /mnt/azurefile
lost+found
outfile
```

#### Links
- [CSI Snapshotter](https://github.com/kubernetes-csi/external-snapshotter)
21 changes: 21 additions & 0 deletions deploy/example/snapshot/nginx-pod-restored-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
kind: Pod
apiVersion: v1
metadata:
name: nginx-restored
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
name: nginx-restored
args:
- sleep
- "3600"
volumeMounts:
- name: azurefile01
mountPath: "/mnt/azurefile"
volumes:
- name: azurefile01
persistentVolumeClaim:
claimName: pvc-azurefile-snapshot-restored

0 comments on commit 3ace0a6

Please sign in to comment.