# Immutability feature for randsomware protection. S3 / B2 'Object Lock' or application keys without deleteFiles permission

**URL:** <https://forum.duplicati.com/t/immutability-feature-for-randsomware-protection-s3-b2-object-lock-or-application-keys-without-deletefiles-permission/11136>\
**Category:** Features\
**Created:** [November 14, 2020, 9:09am UTC](https://forum.duplicati.com/t/immutability-feature-for-randsomware-protection-s3-b2-object-lock-or-application-keys-without-deletefiles-permission/11136 "2020-11-14T09:09:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [November 16, 2020, 12:25am UTC](https://forum.duplicati.com/t/immutability-feature-for-randsomware-protection-s3-b2-object-lock-or-application-keys-without-deletefiles-permission/11136/4 "2020-11-16T00:25:49Z")

</div>

> [@fred](#):
>
> use bucket lifecycle settings in b2 to delete files older than a desired number of days.

That will probably break your backup because data blocks remain in use in current files.  
Duplicati uploads file changes as they are found, but unchanged data is just cited again.

[Features](https://duplicati.readthedocs.io/en/latest/01-introduction/#features) (see `Incremental backups` and `Deduplication`)  
[How the backup process works](https://duplicati.readthedocs.io/en/latest/appendix-a-how-the-backup-process-works/)  
[Compacting files at the backend](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#compacting-files-at-the-backend) (which you can’t do, as it deletes the compacted files)  
[The COMPACT command](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/#the-compact-command) (more details – it’s not only version deletes that can do this)

So, as noted, the general plan for this is no version deletes and no automatic compacts.  
One possible remaining delete is hard to avoid, but may or may not bring you problems.  
If a file upload files, the upload is retried using a new name, and the old name is deleted:

[( $50 Bounty ) Attempting deletion of files before retention span is over](https://forum.duplicati.com/t/50-bounty-attempting-deletion-of-files-before-retention-span-is-over/10932)

I’m kind of curious how backup software that can live with immutability manages to do it.  
One simple crude way would be to store multiple full copies of files, but that’s inefficient.

---

_[View the full topic](https://forum.duplicati.com/t/immutability-feature-for-randsomware-protection-s3-b2-object-lock-or-application-keys-without-deletefiles-permission/11136)._
