Is TMPDIR == --cache-dir?


#1

If I set the TMPDIR env do I still need to specify a --cache-dir or are they one and the same? Basically I was trying to see if there was an env for setting the Cache Dir and wasn’t sure if TMPDIR was it or something else?


#2

The two settings are completely different:

  • TMPDIR contains a directory which should be used for temporary files
  • The cache directory location can be specified either by setting --cache-dir on the command line, or using the environment variable XDG_CACHE_HOME. restic selects the cache directory according to the XDG Base Directory Specification

What are you trying to do? :slight_smile:


#3

I kinda figured but wanted to be sure… didn’t know about XDG_CACHE_HOME, thanks. I’m just trying to simplify my commands a bit and wondered if there was a env for CACHE… now I know :slight_smile: cheers!