I recently started using restic for spooling some backups to cloud storage. Seems to be working great except my cache directory keeps filling up. I’ve created a 15G LVM volume just for the restic cache directory (daily backup is about 8G of data on disk) but this does not seem to be enough. The docs specific to the cache don’t mention anything about cache size, only how to specify where it goes . Anyone know what the rule is for the size of the cache partition?
Cache size is going to scale approximately linearly with the number of objects stored in the repository. If you have a repository that contains a huge number of small files (such as Maildirs) then the cache is going to be large compared to a repository storing much more data, but representing fewer files (e.g. a large database or a media server).
Thanks for the explanation. Yeah, tons of small files (Linux servers). Around 8G per snapshot with nearly 1M files. I wasn’t sure if the “cache” was more of a temporary buffer, or something that needed to be maintained in concert with the snapshots. Seems like the latter. I’ll have to keep growing the LVM volume until I have enough history backed up.
PS: loving restic. Thanks whoever wrote it.
There’s always the
--no-cache option, but I think we all agree that you don’t want that (for performance reasons - the cache speed things up a lot).