Technology and General Blog

I have been utilizing Linode’s object storage for a calendar year now. Its been generally employed to provide picture documents for 1 of my initiatives. In comparison to its competitor’s presenting, Linode’s object storage is definitely a great deal inexpensive than what Google and Amazon are presenting. In simple fact, Linode’s comparison reveals the selling price change is almost 900%. 

Linode’s object storage is 900% cheaper than Amazon AWS.

Item storage engineering provides an economical way to serve static data files like illustrations or photos and even HTML files. It also significantly minimizes the load on the server and even will help decrease bandwidth usage. 

But being a latecomer to this space, Linodes’s item storage is even now in its early levels of development and is not consumer-friendly for rookies. But due to the fact it is centered on Amazon’s AWS technology, it very substantially takes advantage of the same methods of interesting with the objects.

It took me a few days to find out all about Linode’s object storage. The studying curve is not that steep however, the deficiency of appropriate documentation by Linode is a large impediment in the studying system.

A handful of days again, I resolved to delete a person of the storage buckets which experienced additional than 20,00,000 objects. It’s only when I tried out to delete the bucket, I came to know that the bucket has to be emptied before it can be deleted. 

Deleting that volume of documents was surely not probable with Linodes object storage’s website interface as it will allow to delete only one item at a time. So I experienced to transfer to python to vacant the bucket.

Nevertheless, with Linode’s item storage, you have to retrieve the list of objects in the bucket or container initial. And that way too is constrained to 1000 objects per occasion. So you can only retrieve 1000 objects and delete them. Which must choose all around 5 seconds. Nicely, this would seem to be one of the main demerits of object storage technology, at least with Linode’s presenting.

How to Empty all Data files in Linode’s Item Storage Bucket and Delete it

If you have to have to know how to vacant a Linode item storage bucker or delete all the files in it. Here’s how you can do so.

Considering that I was working with python, I selected to use the Boto3 library to interact with Linodes object storage. You can use the adhering to code by changing it with your bucket obtain qualifications. Nevertheless, preserve in head that it could possibly acquire from minutes to hrs depending on the selection of objects in the bucket. For me, it took more than 12 hrs to delete all the 20,00,000 objects.

You will have to set up Python and the Boto3 library.

Once you have that, run the subsequent code by replacing your obtain credentials.

import boto3
s3 = boto3.resource('s3',
                        location_title="Region Title",
                        endpoint_url="ENDPOINT URL",
                        aws_accessibility_critical_id='ACCESS KEY',
                        aws_mystery_accessibility_critical='SECRET Accessibility KEY')

bucket = s3.Bucket('BUCKET NAME')


Area Title: us-east-1

The above facts will vary in accordance to the region you chose.

You can operate the higher than code and wait around whilst it empties the bucket. Then you can go forward and delete the bucket from Linode’s world-wide-web interface for item storage.

Very last but not the the very least, if you have a greater way to delete documents by bulk with Linode’s item storage. Do allow me know via the opinions under.

Leave a Reply

Your email address will not be published. Required fields are marked *