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

tsd-s3cmd does not allow to remove buckets, or their content #1

Closed
ofrei opened this issue Feb 7, 2020 · 2 comments
Closed

tsd-s3cmd does not allow to remove buckets, or their content #1

ofrei opened this issue Feb 7, 2020 · 2 comments
Labels
long-term enhancement New feature or request

Comments

@ofrei
Copy link
Contributor

ofrei commented Feb 7, 2020

As far as I know, there is no API to remove a bucket even if it is empty.

It is difficult to remove files that are placed directly in the root of the bucket.

We frequently use the following workaround but people feel it's too cumbersome: if you have a bucket named MyBucket, and it has a folder MyFolder, you may remove the content of MyFolder in 2 steps: first, on your local machine, create an empty folder call MyFolder. Then, execute

tsd-s3cmd sync --no-check-md5 --delete-removed --force MyFolder s3://MyBucket
@denvdm
Copy link

denvdm commented Feb 12, 2020

Agreed, very frustrating. I often have buckets with only files, i.e. not folders, so above wont work (will start using this now, but bit silly workaround)

@ofrei
Copy link
Contributor Author

ofrei commented Nov 18, 2020

Submitted RT ticket 4145274

Error: running the following command fails to remove the content of the bucket:

tsd-s3cmd del --force -r s3://ofreibucket​

Further, it's not possible to remove the bucket itself (even for empty buckets)

tsd-s3cmd rb s3://ofreibucket

The only workaround is to sync an empty folder:

tsd-s3cmd sync --no-check-md5 --delete-removed --force MyFolder s3://ofreibucket

However this has major limitation: this way one can't remove files in the root of the bucket.

(base) [oleksandr@ip24 empty]$ tsd-s3cmd del -r s3://ofreibucket
User > p33-ofrei
Password > 
OTP > 311713
ERROR: Parameter problem: Please use --force to delete ALL contents of s3://ofreibucket
(base) [oleksandr@ip24 empty]$ tsd-s3cmd del -r --force s3://ofreibucket
User > p33-ofrei
Password > 
OTP > 017316
ERROR: Error parsing xml: mismatched tag: line 6, column 2
ERROR: <html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx/1.16.1</center>
</body>
</html>

ERROR: S3 error: 401 (Unauthorized)

@ofrei ofrei closed this as completed Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
long-term enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants