Prune command details

A post was split to a new topic: Prune: exclude tags

Does -exhaustive imply -all?

No, -exhaustive only means to find ‘orphan’ chunks that are not referenced by any snapshots. It is a plausible use case that you can delete snapshots with a certain snapshot id and at the same time delete these ‘orphan’ chunks.

I think I understand: -all deletes snapshots (revisions) from all snapshot ids according to the specified retention policies; in doing so it deletes (or fossilizes) any chunks referenced by those revisions but not referenced anywhere else. And -exhaustive deletes chunks that aren’t referenced by any snapshot. Correct?

1 Like

This is correct…

1 Like

Reading this:

The -exclusive option will assume that no other clients are accessing the storage, effectively disabling the two-step fossil collection algorithm.

Actually i am backing up some NAS dirs to a storage. No other client has access to that storage, it’s a bucket i created on B2 only for backup purpose.

So it’s fine to always use

-exclusive ?

To only keep a 7-day history, would it be -keep 0:7 ?

Yes.

However it’s questionable why would you want such a short history? It may not accomplish what you may hope to accomplish (I.e. purging data for various compliance reasons).

Is the following correct?

If the keep option is not specified, no snapshots will be deleted and no new fossils created.

For example (assuming exclusive access to a storage) this command will only delete existing fossils, both referenced and unreferenced:

duplicacy prune -all -exhaustive -exclusive

Feature Request: -persist flag that deletes snapshots no matter if there are missing chunks.
Feature Request: -v verbose flag that prints the chunks that are (currently) deleted

3 Likes

I get the following error when trying to prune:

2024-10-04 16:56:28.216 ERROR DOWNLOAD_DECRYPT Failed to decrypt the file snapshots/install-ts639/34: No enough encrypted data (0 bytes) provided
Failed to decrypt the file snapshots/backup/34: No enough encrypted data (0 bytes) provided

Okay I think that was a corrupt backup so I deleted it.

Now when I run prune I get this error:

2024-10-04 17:13:51.990 WARN CHUNK_FOSSILIZE Chunk bae0d76f68c4ca6262d68ea006cad8ec62972da3850e30128bb416a2a42d18c3 is already a fossil
2024-10-04 17:13:54.868 WARN CHUNK_FOSSILIZE Chunk 53e33af467e1b772ba40c3e8e0ff5663f98267974639f871390554e410062339 is already a fossil
2024-10-04 17:13:57.087 ERROR CHUNK_DELETE Failed to fossilize the chunk b0e62a477173fdb2dc7a697dfd3e3585cb02539cff76e273278fe9cd540f1b3b: sftp: "Failure" (SSH_FX_FAILURE)
Failed to fossilize the chunk b0e62a477173fdb2dc7a697dfd3e3585cb02539cff76e273278fe9cd540f1b3b: sftp: "Failure" (SSH_FX_FAILURE)

I think this is because it’s trying to write and there’s 0.0% space.

Is there any way to manually create space to prevent this error?

So while other prune commands need to specify a backup or a snapshot, if I just want to get rid of unreferenced chunks taking up space, I can safely run prune -exhaustive without any keep flags?