如何清洁Azure存储的Blob容器? [英] How to clean an Azure storage Blob container?

查看:301
本文介绍了如何清洁Azure存储的Blob容器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想清洗(转储,ZAP,德尔的 的)蔚蓝色的斑点容器。我该怎么做?

I just want to clean (dump, zap, del .) an Azure Blob container. How can I do that?

注:容器使用IIS(运行Webrole)日志(WAD-IIS的日志文件)

Note: The container is used by IIS (running Webrole) logs (wad-iis-logfiles).

推荐答案

有只有一个方法来批量删除的斑点,这是通过删除整个容器。正如你说,有删除的容器,当你可以再次使用该容器名称之间的延迟。

There is only one way to bulk delete blobs and that is by deleting the entire container. As you've said there is a delay between deleting the container and when you can use that container name again.

您唯一的其他选择是删除一次。如果你可以从那里的斑点都存储在同一个数据中心做删除它会比在本地运行的速度删除。这可能意味着写作code(或者你可以RDP到您的实例中的一个,并安装云资源管理器)。如果你正在写code,那么您可以通过删除并行的项目加快了整个过程。同样的事情也该会的工作:

Your only other choice is to delete the one at a time. If you can do the deleting from the same data centre where the blobs are stored it will be faster than running the delete locally. This probably means writing code (or you could RDP into one of your instances and install cloud explorer). If you're writing code then you can speed up the overall process by deleting the items in parallel. Something similar to this would work:

Parallel.ForEach(myCloudBlobClient.GetContainerReference(myContainerName).ListBlobs(), x => ((CloudBlob) x).Delete());

这篇关于如何清洁Azure存储的Blob容器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆