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

velero backup delete is not deleting kopia data from s3 #8599

Closed
todeb opened this issue Jan 10, 2025 · 7 comments
Closed

velero backup delete is not deleting kopia data from s3 #8599

todeb opened this issue Jan 10, 2025 · 7 comments

Comments

@todeb
Copy link

todeb commented Jan 10, 2025

What steps did you take and what happened:
I created empty s3 repo and did a single backup, and then removing it.
I am expecting the all data that is not referenced by any other backup is deleted.
But on s3 i see the deleted was only content from /backup/testbackup/
but content in /kopia/ is not deleted.

./velero backup create testbackup --include-namespaces backuptest --snapshot-move-data

wait until it finish, check logs and s3.

./velero backup delete testbackup

What did you expect to happen:

all backup files and data volume chunks not referenced by any other backup to be deleted

Anything else you would like to add:

Environment:

  • Velero version (use velero version): 1.13.2
  • Velero features (use velero client config get features): velero-plugin-for-csi:v0.7.1 ; velero-plugin-for-aws:v1.9.2
  • Kubernetes version (use kubectl version): v1.25.16
  • Kubernetes installer & version: -
  • Cloud provider or hardware configuration: -
  • OS (e.g. from /etc/os-release): -

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@kaovilai
Copy link
Member

Duplicate of #8365 which is unplanned.

#8364 in the works may help speed up deletion.

It is not expected to be immediate by design and have been discussed prior as impractical/dangerous with current architecture.

@kaovilai kaovilai closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2025
@todeb
Copy link
Author

todeb commented Jan 13, 2025

@kaovilai I'm not expecting this to be immediate, but even after 2 days i see kopia data in my S3 repo.
What is the schedule? What logs do I need to check why data was not deleted?

@kaovilai
Copy link
Member

Once kopia data is created, some folder will remain even if all backups are deleted. Look at the remaining size if it was reduced.

@todeb
Copy link
Author

todeb commented Jan 13, 2025

Only few files were deleted. I did only one backup on that repo and I deleted it. So no references to other backups.
Expecting that all unreferenced files will gone. I did a backup of volume that contains just a few bytes file. So cannot say much about size decrease.

image

@kaovilai
Copy link
Member

kaovilai commented Jan 13, 2025

My team has tests and validated that size do reduce. So that is sufficient IMO. Concerns are if you have 1TB volume backup and when you delete its still taking up say 200MB.

@todeb
Copy link
Author

todeb commented Jan 13, 2025

Thank you for clarification. I'm also seeing that data chunks are being deleted (when did a test on bigger volumes). Although still that is a bit of mess when kopia is leaving all other files which are not referenced by anything in S3 repo. Expected would be that kopia cleaned this up.

@kaovilai
Copy link
Member

velero do not delete kopia repos.. it init repos, add snapshots to it, delete snapshots as backups are deleted, but repos stay.

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

No branches or pull requests

2 participants