Velero repo-maintenance-job pods are failing on the VKS cluster due to errors encountered during Restic prune operations. Specifically, the prune step fails with a ciphertext verification error, which prevents repository cleanup and may impact backup efficiency or retention.
$ k logs <velero-maintenance-job-pod> -n velero
time="2025-07-02T08:06:01Z" level=error msg="Restic command fail with ExitCode: 1. Process ID is 18, Exit error is: exit status 1" logSource="pkg/util/exec/exec.go:66"
time="2025-07-02T08:06:01Z" level=error msg="An error occurred when running repo prune" error="failed to prune repo: error running command=restic prune --repo=<REDACTED_REPO_URL> --password-file=<REDACTED_PASSWORD_PATH> --cache-dir=<REDACTED_CACHE_DIR>, stdout=, stderr=Fatal: config or key <REDACTED_KEY> is damaged: ciphertext verification failed\n: exit status 1" error.file="pkg/repository/restic/repository.go:123" error.function="(*RepositoryService).exec" logSource="pkg/cmd/cli/repomaintenance/maintenance.go:72"
VMware vSphere Kubernetes Service
Velero 1.12+
Velero’s Restic based backup jobs are failing due to corruption in the repository’s encryption data. This causes Restic to reject prune and unlock operations with ciphertext verification failed errors. Since multiple repositories show the same issue, it likely stems from transient I/O interruptions or degraded storage performance during backup writes.
kubectl set image daemonset/node-agent \ node-agent=velero/velero:v1.16.0 \ --namespace velero
There are usually due to either password mismatching or there is genuine corruption. For corruption condition, you can attempt below:
https://github.com/k8up-io/k8up/issues/835
However as it is depreceated from V1.15, it is much more recommended to migrate to Kopia. In that case where previous corrupt repos cannot be recovered, you can follow below to remove them.
Delete the velero backups first:velero backup delete <name>
This will create a backup delete request to delete the objects from object storage. If they hang on/fail/issues
Identify and delete any stuck DeleteBackupRequest objects:kubectl get deletebackuprequests -n velerokubectl delete deletebackuprequest <request_name> -n velero
Force Delete the Backup CR:Attempt standard Kubernetes deletion of the Backup object:kubectl delete backup <backup_name> -n velero
Remove corrupt repos and jobs
kubectl delete backuprepository <corrupt_repo_name> -n velerokubectl delete job -l velero.io/repository=<corrupt_repo_name> -n velero
Remove Finalizers (If Deletion Hangs):
If the previous command hangs indefinitely, the Velero controller is failing to finish finalizer. Open a new terminal session and patch the object to strip finalizers. Note: However this is a last resort action and exercise caution before proceeding with that.