News for hackers. Stuff that matters.
Re:Backblaze Hard Drive Stats Q2 2019 by jcims on Tuesday August 06, 2019 @08:49AM (#20624627)
Amazon S3 does the same thing. You can make bulk requests but you still are responsible for deleting all objects before removing the bucket.

Agree it's stupid.

Re:Backblaze Hard Drive Stats Q2 2019 by PopeDotNinja on Tuesday August 06, 2019 @09:26AM (#20624919)
Here's a video on deleting a bucket with a large number objects I just watched & found informative. It basically says something like you disable versioning, expire objects after 1 day, delete deletion markers, and delete deleted deletion markers (getting a little meta there).

https://youtu.be/TPavkqp-Ymo

Re:Backblaze Hard Drive Stats Q2 2019 by nijave on Tuesday August 06, 2019 @09:45AM (#20625076)
You can nuke a whole S3 bucket. There's a switch in the cli and a checkbox in the GUI. I think there's another option for deletion protection that disables that somewhere else
Re:Backblaze Hard Drive Stats Q2 2019 by jcims on Tuesday August 06, 2019 @09:52AM (#20625149)
I can't find the CLI option, the docs still say that the bucket must be empty[1]. There's something available in the management console but that doesn't really help with automated deployments and testing.

[1] - https://docs.aws.amazon.com/cli/latest/reference/s3api/delet...

Edit: Found aws s3 rb --force, but this just automates the process of listing/deleting objects then deleting the bucket. When you have 7 million objects in a cloudtrail bucket, that can take days.

Re:Backblaze Hard Drive Stats Q2 2019 by Karunamon on Tuesday August 06, 2019 @09:27AM (#20624933)
No, you can nuke a bucket with stuff in it. I just realize I've never done this before, but the deletion screen calls out that all the contents will go away too.

https://i.imgur.com/j1av6iE.png

Re:Backblaze Hard Drive Stats Q2 2019 by js2 on Tuesday August 06, 2019 @10:45AM (#20625595)
That screen will first delete all the items. It just issues the api calls for you. The amazon web interface is built on the API. It can’t do anything that you can’t do via the API.
Re:Backblaze Hard Drive Stats Q2 2019 by jcims on Tuesday August 06, 2019 @10:58AM (#20625703)
Not all of those APIs are published or available via standard libraries...particularly with newer services.
Re:Backblaze Hard Drive Stats Q2 2019 by kalleboo on Tuesday August 06, 2019 @09:46AM (#20625097)
That must be a somewhat recent addition - a year or two ago it wasn't possible (and the suggestion was what was posted in another comment - set the lifecycle rules to expire all the objects in a day)

edit: actually the "don't close your browser window" warning leads me to believe that's just a client-side JavaScript solution which doesn't work with massive buckets (we had one with millions of objects)

Re:Backblaze Hard Drive Stats Q2 2019 by jandrese on Tuesday August 06, 2019 @11:58AM (#20626346)
Why would the Javascript solution be inherently unable to deal with large buckets? Do we have to assume that they're taking some incredibly naive approach and trying to load every single ID into memory at once instead of streaming them out in chunks? It seems like Amazon should be capable of hiring an engineer who knows what they are doing.
Re:Backblaze Hard Drive Stats Q2 2019 by kalleboo on Tuesday August 06, 2019 @12:10PM (#20626499)
It just seems like an inherently slow process. I remember at the time there was a python script someone wrote, which used the API to delete them in 1000 object chunks, and even running that with 10 threads the delete was going to take days and days.
Re:Backblaze Hard Drive Stats Q2 2019 by jcims on Tuesday August 06, 2019 @12:15PM (#20626546)
The problem is the duration and durability of the exercise when you have millions of objects in the bucket. It could easily take days.
Re:Backblaze Hard Drive Stats Q2 2019 by jandrese on Tuesday August 06, 2019 @01:26PM (#20627384)
At least it's the kind of problem you can come back to and restart if the process dies in the middle. You're bulk deleting data so maintaining integrity isn't a concern.
Re:Backblaze Hard Drive Stats Q2 2019 by _Propaganda_ on Tuesday August 06, 2019 @09:12AM (#20624812)
This isn't strictly true - If you use the S3 dashboard the Delete Bucket button will abstract all the individual object deletes away for you.