Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Path Provisioner and Velero #8251

Open
mt190502 opened this issue Sep 27, 2024 · 3 comments
Open

Local Path Provisioner and Velero #8251

mt190502 opened this issue Sep 27, 2024 · 3 comments
Assignees

Comments

@mt190502
Copy link

Hello.

I am using local-path-provisioner in my Kubernetes environment. I created a local minio server for backups. I installed and configured Velero, but when I take a backup, I get the following warning.

time="2024-09-23T10:28:03Z" level=info msg="Summary for skipped PVs: [{\"name\":\"pvc-29b814db-3cde-4633-8890-dc279bb47e05\",\"reasons\":[{\"approach\":\"podvolume\",\"reason\":\"opted out due to annotation in pod commafeed-k8s-web-7b8bfb6876-5d9rm\"},{\"approach\":\"volumeSnapshot\",\"reason\":\"no applicable volumesnapshotter found\"}]},{\"name\":\"pvc-d1f4e278-f990-4d43-b330-1710596a0804\",\"reasons\":[{\"approach\":\"podvolume\",\"reason\":\"opted out due to annotation in pod commafeed-k8s-postgres-6c44f9c98b-j6frs\"},{\"approach\":\"volumeSnapshot\",\"reason\":\"no applicable volumesnapshotter found\"}]}]" backup=velero/commafeed-k8s logSource="pkg/backup/backup.go:495"

I configured velero this params:

 velero install --provider aws \
      --plugins velero/velero-plugin-for-aws:v1.10.1 \
      --bucket velero-backup \
      --secret-file ./credentials-velero \
      --use-volume-snapshots=false --backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://$(tailscale ip --4 m1):30010 --use-node-agent

I followed this issue and i convert all pvs type local from hostpath: rancher/local-path-provisioner#85
Is there any way to use velero with local-path-provisioner? Thanks.

@reasonerjt
Copy link
Contributor

I assume snapshot won't work for local provisioner, please use the flag --default-volumes-to-fs-backup to use fs-backup for the data in your volume.

@mt190502
Copy link
Author

Yeah. That's worked. Thanks for helps.
I reinstalled velero with this parameters:

❯ velero install --provider aws \
      --plugins velero/velero-plugin-for-aws:v1.10.1 \
      --bucket velero-backup \
      --secret-file ./credentials-velero \
      --use-volume-snapshots=false --backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://$(tailscale ip --4 m1):30010 --use-node-agent --default-volumes-to-fs-backup

image

image

@mt190502
Copy link
Author

mt190502 commented Sep 29, 2024

I tried delete a deployment for backup/restore test. But i get this error

image

image

Edit: Postgresql official docker image changes default permissions to 999:999. I changed the folder permissions with this command and the restore was completed:

chmod 777 /opt/local-path-provisioner/pvc.......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants