Prune revisions (or not to create new one) with zero file changes

Hello Everyone,

I would like to have a prune option to prune revisions that do not create new data chunks. So for a specific backup I don’t need date based pruning, only to have backups in case something changes. (This is the default behavior of duplicati.)

Example log:

2020-12-06 22:11:08.398 INFO BACKUP_STATS File chunks: 904 total, 3,298M bytes; 0 new, 0 bytes, 0 bytes uploaded

I’m sorry if this topic is a duplicate, I can remember that once I’ve found a topic like this.

Regards,
Palver

I’m thinking of writing a shell script that uses brute force to check each revision one-by-one for differences using the diff command and executing prune for revisions with no changes.

Does anybody have a script that might help with this or that might do it better?

What is the usecase for this? What is to be gained?

Having backups at predetermined and predictable cadence is much more important than saving a trivial amount of space by not having those “duplicate” snapshots.

Collapsing the snapshots will also break predictability of pruning schedule.

1 Like

That is a good question. Sorry, I could have provided context …

I was downloading from Crashplan some backups of a large Apple Photos album from as many historical months as possible and store in duplicacy

Unfortunately I didn’t do it in a very organized way. In hindsight, I should have had a single restore point in existence at a time and back that up, then restore next version. Another simpler way would have been to restore all versions and do a single snapshot with all of them.

Instead, I downloaded several months at a time. I started running out of disk space, so couldn’t keep all of them at a time and created a snapshot before deleting some completed downloads. I also (unintentionally) had a backup job running on duplicacy web running and there were lots 0-diff snapshots and some snapshots had in-progress restores. I was trying to clean it up the best I could so if I someday do need to restore my photo library from a specific month, I wouldn’t have to sift through too much noise.