velero: Restic restore fails for dynamically provisioned EFS volume
After having successfully performed a restic-integrated backup, and deleting the backed-up namespace, restoring the same fails. The output from the restic pod on the host shows:
time="2018-06-21T22:02:50Z" level=error msg="Error getting volume directory name" controller=pod-volume-backup error="volume not found in pod" error.file="utils.go:66" error.function=GetVolumeDirectory logSource="pkg/controller/pod_volume_backup_controller.go:158" name=nginx-example-pb4kc namespace=heptio-ark
time="2018-06-22T10:15:35Z" level=error msg="Error restoring volume" controller=pod-volume-restore error="error identifying path of volume: expected one matching path, got 0" error.file="pod_volume_backup_controller.go:295" error.function=singlePathMatch logSource="pkg/controller/pod_volume_restore_controller.go:273" name=nginx-example-20180622121532-zfcj8 namespace=heptio-ark
Here’s the full manifest of the backed up item (this was the only stuff living in the backed-up namespace):
---
apiVersion: v1
kind: Namespace
metadata:
name: nginx-example
labels:
app: nginx
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: nginx-logs
namespace: nginx-example
labels:
app: nginx
spec:
storageClassName: aws-efs
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Mi
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
namespace: nginx-example
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
annotations:
backup.ark.heptio.com/backup-volumes: nginx-logs
spec:
volumes:
- name: nginx-logs
persistentVolumeClaim:
claimName: nginx-logs
containers:
- image: nginx:1.7.9
name: nginx
ports:
- containerPort: 80
volumeMounts:
- mountPath: "/var/log/nginx"
name: nginx-logs
readOnly: false
---
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: my-nginx
namespace: nginx-example
spec:
ports:
- port: 80
targetPort: 80
selector:
app: nginx
type: LoadBalancer
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 31 (16 by maintainers)
Yes, the issue here is what I thought - Ark recreates the PV from the backup, which points at the path in the NFS (EFS) server that no longer exists (due to it being deleted when the PVC was deleted). We’ll see what we can come up with.