Comments (5)
This duplicates in the large portion with the cli counterpart of Backblaze/b2-sdk-python#361 (already merged but not yet released due to a couple more PRs landing on the sdk side next week).
The basic idea would be to run b2 rm bucket-name '*' && b2 delete-bucket bucket-name
and make it the responsibility of the user to make sure they are not uploading any more stuff to the bucket while they are trying to remove it completely.
Putting both in the same command could make sense, especially if we added --attempts 10
to try it many times in case some uploads keep landing - that'd be hard to achieve in a different way (without a special command to support it).
As for internals, it's a bit more complicated than in your design - the wildcard removal system uses a thread pool in order to increase performance - removing a file version is an io-bound call and putting those in python threads can make things much faster (here I believe it's nearly 10 times faster with default settings). Furthermore the streaming and backpressure are important considerations - a b2 bucket can contain a bazzilion objects and just their version ids might not fit within memory of the system that is trying to clean it. Anyway - that's merged now. I suggest that you wait for the cli counterpart of the mentioned PR to land and then chain that functionality in an optional mode of "delete-bucket", add a couple of tests and have a good feature.
I'm sorry about the review queue buildup, I've been horribly sick and could not review long PRs while two people were coding. I hope that clears up a lot in the next few days.
from b2_command_line_tool.
@ppolewicz Reopened and added new options.
from b2_command_line_tool.
@ppolewicz Please assign this one to me. I'll write some code and submit a PR. Thanks!
from b2_command_line_tool.
I suggest that you wait for the cli counterpart of the mentioned PR to land and then chain that functionality in an optional mode of "delete-bucket", add a couple of tests and have a good feature.
Sounds good to me!
I've been horribly sick and could not review long PRs while two people were coding. I hope that clears up a lot in the next few days.
Take it easy, and get well soon!
from b2_command_line_tool.
Closing now that 3.7.0 is available with rm
command.
from b2_command_line_tool.
Related Issues (20)
- Install from source documentation section should be updated to PDM
- Prevent writing b2 file information to stdout when using download-file HOT 2
- [Question or Feature Request] Excluding Symbolic Links HOT 2
- Official Docker Image ? HOT 3
- delete_file_version needs bypassGovernance option HOT 1
- Can't upload FIFOs with upload-file HOT 6
- UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 1325: ordinal not in range(128) HOT 1
- [Question] Explain how sync between buckets work; slow overall speed HOT 8
- b2sdk.exception.InvalidAuthToken: Invalid authorization token. Server said: (bad_auth_token) HOT 2
- Error when resuming upload HOT 2
- switch to stable pypy version after new pypy is released HOT 2
- b2 ls --json destroys output structure with informational message HOT 1
- `Using https://api.backblazeb2.com` output to stderr causing problems for automation that only expects errors and warnings on stderr
- pip install breaks with setuptools 69.0.0 HOT 3
- b2 should respect the spec's default fallback for `XDG_CONFIG_HOME` HOT 4
- Feature request: Support transparent compression HOT 1
- error: the following arguments are required: command HOT 5
- Issue with b2 sync :: KeyError: 'content-length' HOT 11
- Package `b2` for Alpine Linux HOT 5
- Linux.Xor.DDoS false-positive from chkrootkit due PyInstaller use
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from b2_command_line_tool.