We have restic available on our shared HPC cluster as a module (lmod). We recently ran into an issue with the caching directory for some users, for a large backup in S3 (100TB+). We only offer 15GB of home space, so it’s not enough to store the restic cache files, but we do have other filesystems available with a lot of storage (like en ephemeral $SCRATCH filesystem which sounds perfect for this).
With module/lmod, it’s easy to define environment variables, however, restic is using $XDG_CACHE_HOME which is not restic-specifc, and potentially can run into conflict with other modules we have. I’ve nothing against XDG_CACHE_HOME, but would it be possible to have
a restic specific variable to override the cache dir, as it would be defined in command line by --cache-dir=/path ? something like RESTIC_CACHE_DIR maybe?
Reference link: https://restic.readthedocs.io/en/latest/manual_rest.html#caching