Deleting a KOTS snapshot in an embedded kURL cluster does not reclaim space on the disk


#1

After I delete a KOTS snapshot in an embedded kURL cluster it does not seem to reclaim space on the disk. How can I reclaim the space?


#2

After deleting a snapshot, the Velero Restic data will remain until the maintenance cron prunes data. This happens once every 7 days. It is scheduled this infrequently because it holds an exclusive lock on the repo making snapshots unavailable while pruning.

It is possible to force Restic to prune the data with the following hack. This will make Restic prune the repos within 5 minutes the next time the cron runs.

kubectl -n velero get resticrepositories -oname \
  | xargs -I{} kubectl -n velero patch {} \
  --type='json' \
  -p '[{"op":"replace", "path":"/status/lastMaintenanceTime", "value":"2020-01-01T00:00:00Z"}]'