如何删除启用了版本控制的 blob?

发布于 2025-01-13 06:49:06 字数 298 浏览 0 评论 0原文



我对 Azure 存储上的 blob 文件有非常奇怪的行为。 请注意,我启用了软删除(7 天)并启用了版本控制。
我正在使用 blobfuse 连接到我的计算机。
当我尝试删除没有版本的 blob 时,无论是从虚拟机还是从门户使用 rm -rf 。该 blob 被列为已删除,但未放入 7 天删除过程中。我必须手动进入版本并删除 blob 在删除时以某种方式创建的版本,然后 blob 才会进入删除过程,并且我会得到永久删除前的天数行。 无论如何,我是否可以删除(放入删除过程)一个 blob,而不必先手动删除它的所有版本?

问候。

I have very strange behaviour with blob files on Azure storage.
Mind you I have soft delete enabled(7 days) and versioning enabled.
I am using a blobfuse connection to my machine.
When i try to delete a blob with no version, be it with rm -rf from VM or from portal. The blob is listed as deleted but not put in the 7 days deletion process. I have to manually go into versions and delete the version the blob somehow created when i deleted it and only then the blob goes into the deletion process and i get the Days until permanent deletion line.
Is there anyway i can delete(put into deletion process) a blob without having to manually remove all of it's version first?

Regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

王权女流氓 2025-01-20 06:49:06

我认为您还可以使用生命周期管理在一段时间后删除版本。我的理解是,如果您以这种方式进行设置,则删除的 blob 将首先成为以前的版本,然后生命周期管理将删除该版本,它会变为软删除并保留您设置的软删除时间。

I think you can also use lifecycle management to delete the versions after a certain amount of time. My understanding is that if you set it up this way the deleted blobs will become a previous version at first and then lifecycle management will then delete the version and it becomes soft deleted and retained for the amount of time you set for soft deleted.

旧伤还要旧人安 2025-01-20 06:49:06

从 Microsoft Document 开始,除非您不指定 Blob 的具体版本,否则 Blob 将不会在 7 天的软删除后消失。 ** **如果您在删除 Blob 时未提及版本,那么您想要哪个版本将会是令人困惑的部分删除并且该版本仅进入软删除过程

如果存储帐户同时启用了版本控制和软删除,
那么当你删除一个 blob 时,该 blob 的当前版本就会变成
以前的版本。没有创建新版本,也没有软删除
快照已创建。软删除保留期限不在
对删除的 blob 的效果。

您必须手动删除或选择版本,然后才会进入软删除过程:

软删除为删除 blob 版本提供额外的保护。
当您删除 Blob 的先前版本时,该版本将被删除
软删除。软删除版本将被保留,直到软删除为止。
删除保留期已过,此时它是永久的
已删除。要删除 Blob 的先前版本,请调用删除 Blob
操作并指定版本ID。

有关更多信息,请参阅此 关于软删除的 Microsoft 文档

As from Microsoft Document blob will not go in 7 days of soft deletion until unless you will not specify the specific version of blob.** **If you are deleting the blob without mentioning the version it will be confusing part, which version you want delete and that version only go in soft deletion process

If versioning and soft delete are both enabled for a storage account,
then when you delete a blob, the current version of the blob becomes a
previous version. No new version is created and no soft-deleted
snapshots are created. The soft delete retention period is not in
effect for the deleted blob.

You have to manually delete or select the version then only it will go in soft deletion process:

Soft delete offers additional protection for deleting blob versions.
When you delete a previous version of the blob, that version is
soft-deleted. The soft-deleted version is preserved until the soft
delete retention period elapses, at which point it is permanently
deleted. To delete a previous version of a blob, call the Delete Blob
operation and specify the version ID.

For more information do refer this Microsoft Document on Soft Deletion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文