# Backblaze S3 issue: duplicated uploads after delete

**URL:** https://meta.discourse.org/t/backblaze-s3-issue-duplicated-uploads-after-delete/183313
**Category:** Self-hosting
**Tags:** s3
**Created:** [March 15, 2021, 3:13pm UTC](https://meta.discourse.org/t/backblaze-s3-issue-duplicated-uploads-after-delete/183313 "2021-03-15T15:13:38Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![V1ktor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/v1ktor/32/232406_2.png) [@V1ktor](https://meta.discourse.org/u/V1ktor)
#### Post date: [June 18, 2023, 2:46am UTC](https://meta.discourse.org/t/backblaze-s3-issue-duplicated-uploads-after-delete/183313/13 "2023-06-18T02:46:08Z")

</div>

So I did contact support, and it seems there is a solution to the orphan problem. Here’s what Backblaze support said:

> A few things are going on here. Looking at your account here, you have your bucket lifecycle rules set to **Keep all files**. If you were to change your lifecycle rules to **Keep only the last version of the file** , the hidden file will be deleted after 24 hours of behind hidden, and clearing up storage space.
> 
> Now, another layer to add in here is when using an S3-compatible service, any time an object delete is called, it will be hidden. And from here, depending on the lifecycle rules of the bucket, it will be deleted or remain hidden. In your case, the files remain hidden and are not being deleted due to Keep ALL files.
> 
> For an object to be deleted when an object delete is called, is to have the file version ID with the accompanying delete call, which I don’t think the integration is doing if files are just being hidden.
> 
> In order for these files to be deleted from the bucket, you’ll need to sign into your Backblaze account, go to your bucket, and update its lifecycle setting to [**Keep only the last version of the file**](https://www.backblaze.net/b2/docs/lifecycle_rules.html#:~:text=Setting%20Lifecycle%20Rules%20on%20the%20Web) **.** This will delete the hidden file from the bucket after 24 hours.

By by default, Backblaze sets “Keep all files” lifecycle rule for newly created buckets. That’s probably why everyone has issues with orphans. Changing lifecycle rule to “Keep only the last version of the file” deletes orphans after 24 hours once it’s hidden.

This might be worth mentioning in this thread:

> [@Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916#backblaze-b2-cloud-storage-8):
>
> information_source This topic covers how to configure some common S3 compatible Object Storage providers (S3 clones). See [Set up file and image uploads to S3](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229) for more details about Amazon AWS S3 configuration, which is officially supported and used internally by Discourse for our hosting services. Provider Service Name Works with Discourse? [Amazon AWS](#aws-s3-2) S3 Yes [Digital Ocean](#digital-ocean-spaces-3) Spaces Yes [Linode](#linode-object-storage-4) Object Storage Yes [Google Cloud](#google-cloud-platform-storage-5) Storage Yes [Scaleway](#scaleway-object-storage-6) Object Storage Yes [Vultr](#vultr-object-storage-7) Obj…

---

_[View the full topic](https://meta.discourse.org/t/backblaze-s3-issue-duplicated-uploads-after-delete/183313)._
