Disk usage in Users data folders

Hi,

My restic service is storing data in C:\Windows\System32\config\systemprofile\AppData\Local\restic\ where 17Gb is being used.

I also found that 4.1Gb is used in C:\Users\Administrator\AppData\Local\Temp\2\restic-check-cache-4214071236 and another 4.1Gb in C:\Users\Administrator\AppData\Local\restic.

Why are those folders used for?

This ought to be the cache for the SYSTEM user I presume you run your restic backups with.

These two are 1) the temporary cache restic creates when running the check command; and 2) the regular cache restic uses when you e.g. run backups. Both of them for the Administrator user as opposed to the previous SYSTEM one.


The path is described here: Manual — restic 0.16.3 documentation

If you want to you can safely delete these directories when you have made sure that restic is not running on your system. But restic will of course create new cache files when it needs to, unless you run it with the --no-cache option.

1 Like

If you run restic cache --cleanup after a backup operation it’ll prevent stale cache data being left behind.

Thank you for pointing me to the documentation.

I see here that I can use --cleanup-cache. Is there anything I should be aware before running this command ?

To clarify, this will delete cache files/dirs that are for repositories that restic has not seen cache usage for in X days (by default 30, configurable with --max-age).

No, it does the same thing as cache --cleanup. The only thing to be aware of is that if you need to use those old repos again then the cache will be recreated at that time.

1 Like

I ran it and got a message saying “no old cache dirs found”. Fine for me.

To ensure your restic cache under systemprofile is current, do make sure you’re running the cache command in the same context as the backups are run.

Also the path with a 2 child folder seems unusual, I don’t recall seeing restic using such child folders. This may be spurious, if the data in it looks old I’d delete it.

I just had a look at the folders C:\Users\Administrator\AppData\Local\Temp\2\restic-check-cache-4214071236 and C:\Users\Administrator\AppData\Local\restic. They don’t seem to have changed since 2 days ago when my hosting provider issued a prune command which ran into a disk space issue. Looking at a print screen they sent me I am seeing that one of those folders was one created at that moment. I think then I can safely delete it.