Backblaze S3 问题:删除后重复上传

I am using Backblaze as S3 storage and have the clean up orphan uploads setting turned on. The problem is, instead of deleting the orphan upload, there created a duplicated file with 0 byte.
see below for example. the (2) indicates the number of files with the same name. if expanded, you will see the original file still exists, also with an 0 bytes file. Has anyone had the similar issue? is it the problem of Backblaze or the setting? Thanks.

Screen Shot 2021-03-15 at 8.00.38 AM

Discourse uses the S3 API, and since it works fine with AWS S3 it leaves this to being a Backblaze problem. Maybe contact their support? I will add a note about this in Using Object Storage for Uploads (S3 & Clones)

3 个赞

There’s an ellipsis which suggests the name of the 0-byte file is being truncated. What is the full name there? I’d wager the bucket has a file lifecycle configured and that file is a “hide marker”, as they call it.

When the lifecycle expires both versions should disappear.

3 个赞

The truncated part is “hidden”. I think you are right. It looks like the duplicated files are all recently uploaded ones. I will wait some time and see if they are gone. Thank you.

1 个赞

Hi,
Can you please update us if the issue has been resolved?
More than a year passed since your last post, so hoping this is OK now… :slight_smile:

1 个赞

问题尚未解决。我现在已手动删除了 BackBlaze 中的所有孤立文件。我想此时我将迁移到 S3,因为定期清理存储本身就是一项任务。

3 个赞

我的经验更新如下……
我有一个免费的 B2 账户(即前 10GB),并且没有添加付款方式。

备份文件会轮换,几天后“隐藏”文件会被永久删除。我一次最多只有 7 个文件(Discourse 最多有 5 个每日备份轮换)。由于我的备份从未超过 500MB,因此我从未需要为任何东西付费或手动删除任何“孤立”文件。

2 个赞

这个问题有什么变化吗?有人尝试联系 Backblaze 支持来解决这个问题吗?

1 个赞

但是问题似乎出在“上传”上!!
因为“备份”的文件数量不多/过多,无法管理。它们是可以管理的,甚至是手动管理的。

此问题似乎仍在继续。

@Falco 能否详细说明 Discourse 执行哪些 S3 操作来清理孤项?

谢谢。我看到 copy_to_tombstone 在这里起作用。我找不到关于 tombstone 和孤立文件的任何文档,所以我只能根据我在论坛上读到的内容来推测它的工作方式。如果我错了,请纠正我:

  1. 当识别出孤立文件(干净的孤立上传宽限期小时)时,它会被复制到 tombstone 文件夹(copy_object)。
  2. 然后将其删除(或应该被删除),使用 delete_object
  3. 当时机成熟时(清除已删除上传的宽限期天),它将从 tombstone 文件夹中删除。

这是正确的吗?

根据我在 Backblaze 上看到的情况,它确实被复制到了 tombstone 文件夹。它只是没有被删除,而是创建了一个空的隐藏版本。

1 个赞

因此,我联系了支持部门,似乎有一个解决孤立文件问题的办法。以下是 Backblaze 支持部门的说法:

这里有几个问题。查看您的账户,您将存储桶生命周期规则设置为“保留所有文件”。如果您将生命周期规则更改为“仅保留文件的最后一个版本”,隐藏的文件将在隐藏 24 小时后被删除,从而清理存储空间。

另外需要注意的是,在使用 S3 兼容服务时,每次调用对象删除时,该对象都会被隐藏。然后,根据存储桶的生命周期规则,它将被删除或保持隐藏状态。在您的情况下,由于“保留所有文件”,这些文件保持隐藏状态且未被删除。

要在调用对象删除时删除对象,需要在删除调用中包含文件版本 ID,但我认为如果文件只是被隐藏,集成并没有这样做。

要从存储桶中删除这些文件,您需要登录您的 Backblaze 账户,进入您的存储桶,并将其生命周期设置更新为仅保留文件的最后一个版本**。这将在隐藏后 24 小时内从存储桶中删除隐藏文件。

默认情况下,Backblaze 为新创建的存储桶设置“保留所有文件”的生命周期规则。这可能是每个人都遇到孤立文件问题的原因。将生命周期规则更改为“仅保留文件的最后一个版本”会在隐藏后 24 小时删除孤立文件。

这可能值得在此帖子中提及:

2 个赞

干得好!可以请你把它编辑到维基上吗?

没意识到这是一个维基。已更新。

1 个赞