-
Notifications
You must be signed in to change notification settings - Fork 516
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
mc rm
with --older-than flag removes buckets, too
#2635
Comments
Workaround: |
@nikwen this is expected behavior for the time being. do you want to preserve the buckets? |
@harshavardhana Thank you for your fast reply! My usecase: I have a bucket where I regularly need to delete all objects older than Improvements I would suggest:
|
mc rm
with --older-than flag removes buckets, too
I tend to think that we should not remove buckets so quickly, users can lose a lot of bucket configurations by mistake (bucket policy, notification, lifecycle later, etc..) Also we need to discuss how mc should behave when versioning is enabled. Currently, it is not possible to remove a bucket with |
@vadmeste Totally agree! Also feel free to change the issue title or body to whatever you need. 😉 |
@nikwen We have decided to add a new command
|
@kannappanr I like this. I assume |
Fixes minio#2635 - Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself.
Fixes minio#2635 - Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself.
Fixes minio#2635 - Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself.
Fixes minio#2635 - Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself.
Fixes minio#2635 - Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself.
Fixes minio#2635 - Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself.
Fixes minio#2635 - Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself.
Change mc rm --recursive behavior to delete objects in bucket but not the bucket itself. Fixes #2635
Thank you guys. You are so awesome!
|
Hi, I am trying to cleanup expired objects using the following command:
This also removes the The version is RELEASE.2020-04-04T05-28-55Z. Thanks, |
This is a local folder not a bucket @tuscland |
Thanks @harshavardhana ! |
Yes one is behaving for a filesystem, another for an object storage both are different entities with different meaning. |
What mc does abstraction of interaction between two diametrically opposite systems, it doesn't try to generalized behavior as the concerns are different underneath for each system in question. |
The behavior is still misleading though because when the |
It's not misleading it is as per what we wanted to do with mc @tuscland , you may not want it this way. But it's the way it is as per our requirements. As I stated abstraction is not generalization.. Now regarding the differentiation in what is displayed during --fake can be fixed, feel free to open a new issue for that. |
Expected behavior
There should be a way to delete all objects in a bucket using the
--older-than
flag, but not the bucket itself.I would expect that this happens when running
mc rm -r --older-than 30 --force minio/bucket/
.Actual behavior
The bucket was deleted as well. (Just for the record, it was older than 30 days.)
Steps to reproduce the behavior
x
days.mc rm -r --older-than x --force minio/bucket/
.Alternatively:
mc version
System information
Fedora 29
The text was updated successfully, but these errors were encountered: