Excluding directories after backup started

I had forgotten that I had snapshots setup on my NAS folders before starting my duplicacy backup to iDrive e2. So I stopped the backup halfway, and added the exclusions, since I didn’t want to exceed my bucket storage on e2 (would have led to a lot of overage charges).

My question is: how can I check if some chunks already have been backed up from the snapshots? If so, how do I delete (or prune?) these so they are not taking up cloud space?

Since you have stopped backup halfway, there would not have been a revision uploaded, referencing those chunks, and hence there is no revision for you to delete to get rid of those chunks.

You would need to run prune -exhaustive -a. This will enumerate all chunks and delete those not referenced by any snapshots.

I’m sorry, could you please dumb down that explanation for me?

Duplicacy concatenates all your files into a long sausage, shreds it to chunks, uploads chunks to the store, and then uploads a manifest, that describes how to reconstruct your files from the chunks. That manifest is a revision file.

You can read more here: https://raw.githubusercontent.com/gilbertchen/duplicacy/master/duplicacy_paper.pdf

When you prune a revision, all chunks that are not used by any remaining revisions are deleted.

When you started backup, some chunks got uploaded, but the final manifest did not. So there is no revision that references those extra chunks.

To deal with this prune has -exhaustive mode, where it looks at all chunks, not just those referenced by revisions, and removes chunks that are not referenced by anyone.

In a nutshell, to cleanup the datastore you need to run:

duplicacy prune -exhaustive -a

That makes sense! Thank you for taking the time to explain that.

If I’m understanding this right, I should complete the rest of the backup so that the (first) revision file is generated (since this is my first backup). Then run prune in exhaustive mode to remove any chunks which are not referenced.

If I run prune in exhaustive mode now, everything would be removed, since there is no revision file and all chunks are therefore un-referenced.

Please correct me if I’m wrong.

1 Like

Yes, that’s correct!

Actually I’m not sure what will happen if you run prune on an empty datastore. But what you proposed will work for sure.