-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Selection of packs to repack based on size #5109
Description
Output of restic version
restic 0.17.2 compiled with go1.23.2 on linux/amd64
What should restic do differently? Which functionality do you think we should add?
restic prune should have an option to select the packs which are repacked when using --repack-small. My suggestion would be to add an option --repack-smaller-than to select packs smaller than a particular size. One could then do
restic prune --repack-small --repack-smaller-than 16M --pack-size 64M
to repack really small packs (e.g. 4M).
What are you trying to do? What problem would this solve?
If the pack size has changed in a repository over time, there can be parts of data in differently sized packs. Let's assume there are 100 GB in 4M packs, 1 TB in 16M packs and 1 TB in 64M packs. Repacking everything to 64M takes a long time, but repacking those 4M packs to 64M would be doable and reduce the number of packs significantly.
More discussion in https://forum.restic.net/t/repack-smallest-packs/8621/12
Of course, there would be many other possibilities for pack selections. The one I am proposing here is a selection I had a need for.
Did restic help you today? Did it make you happy in any way?
Restic is just great. It scans so quickly through a relatively large disk and thus enables frequent backups, the deduplication is impressive. Being able to use one repository from Windows and Linux is also very helpful.