# Does Duplicati Overwrite .ZIP Files in Storage

**URL:** <https://forum.duplicati.com/t/does-duplicati-overwrite-zip-files-in-storage/15626>\
**Category:** Support\
**Created:** [January 22, 2023, 2:07pm UTC](https://forum.duplicati.com/t/does-duplicati-overwrite-zip-files-in-storage/15626 "2023-01-22T14:07:10Z")\
**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:** [January 22, 2023, 3:47pm UTC](https://forum.duplicati.com/t/does-duplicati-overwrite-zip-files-in-storage/15626/4 "2023-01-22T15:47:41Z")

</div>

> [@gpatel-fr](#):
>
> To update old data, Duplicati has to upload new data and delete the old data.

That nice broad answer even covers unusual things like upload [retries](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#number-of-retries) and [The PURGE command](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/#the-purge-command). Typically, the frequent activities are backups, deletes per retention, and compact of remaining data.

There are some subtle points which one can glean from the author’s doc, but also from the manual.

> [@handyguy](#):
>
> invalidate the old ZIP files in the database

Not immediately because typically some (or most) of the old data is still in either the new backup as unchanged files, or as the contents of a previous backup that is still around due to chosen retention.

[Compacting files at the backend](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#compacting-files-at-the-backend)

> When a predefined percentage of a volume is used by obsolete backups, the volume is downloaded, old blocks are removed and blocks that are still in use are recompressed and re-encrypted.

[The COMPACT command](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/#the-compact-command)

> Old data is not deleted immediately as in most cases only small parts of a dblock file are old data. When the amount of old data in a dblock file grows it might be worth to replace it.

When compact collects partly filled dblocks, new one gets new name and old ones get deleted.  
If some provider charges for download or upload, factor that in as well. The math gets complex.

[Deleting files - excessive download](https://forum.duplicati.com/t/deleting-files-excessive-download/15592) said a lot about how compact works, and trying to optimize.  
[Cost optimisation on wasabi](https://forum.duplicati.com/t/cost-optimisation-on-wasabi/11803) had some other thoughts on dealing with a retention charge policy.  
That one was potentially a bit worse than a minimum duration, if it interacted with other policies.

---

_[View the full topic](https://forum.duplicati.com/t/does-duplicati-overwrite-zip-files-in-storage/15626)._
