Skip to content

adding a bucket-remove-all-objects-versions function #341

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BastLeblanc
Copy link

bucket-remove-force fails if the bucket contains versions.

This adds delete of each object versions, can be very long so I added a small counter display.

Example of run:

bucket-remove-force mybuckettobetrashed
You are about to delete all objects from and remove the following buckets:
mybuckettobetrashed  2023-08-11T14:24:00+00:00
Are you sure you want to continue? y
remove_bucket failed: s3://mybuckettobetrashed An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty. You must delete all versions in the bucket.
Remove bucket failed, trying to delete object versions first (this may take a while)...
Removing all versions from mybuckettobetrashed
removing files
93 out of 1761

@BastLeblanc BastLeblanc requested a review from mbailey as a code owner November 10, 2023 12:09
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

Successfully merging this pull request may close these issues.

1 participant