"unused size after prune" report lots of GiB

Running “restic prune” after having deleted some snapshots, it seems that unused data isn’t removed from the repository as explained in the manual:

loading indexes...
loading all snapshots...
finding data that is still in use for 1 snapshots
[0:15] 100.00%  1 / 1 snapshots
searching used packs...
collecting packs for deletion and repacking
[0:01] 100.00%  282031 / 282031 packs processed

to repack:             0 blobs / 0 B
this removes:          0 blobs / 0 B
to delete:             0 blobs / 0 B
total prune:           0 blobs / 0 B
remaining:       5292668 blobs / 4.529 TiB
unused size after prune: 35.212 GiB (0.76% of remaining size)

done

Any idea how to find out why these 35GiB of unused data are remaining in the repo?

1 Like

The default is that restic is able to keep up to 5% of unused data - this removes the need to repack pack files a lot. In a sense you can trade disc space for prune speed (and prune indicated data transfer) and vice versa.
Have a look at the --max-unused parameter which can be giving in % or in absolute size. As already said, the default for this parameter is 5%.

4 Likes

Note there is also --dry-run, so you can experiment with different --max-unused values and see what would be the effect.

1 Like

@alexweiss You did mean to write --dry-run, right (although, --try-run is an interesting concept)? :laughing:

1 Like

:sweat_smile: Oh, these typos…

Thanks a lot, that seems to be working!