restic version
restic 0.16.4 compiled with go1.21.6 on windows/amd64
I tried to set temporary directory using TEMP, TMP and TMPDIR environment variables but temporary packfiles during backup and prune are created in default folders.
The temporary folder, which I want to use, does exist.
Running restic with nssm as Local Account, it creates temp files in C:\Windows\SystemTemp and running it with my user account, it creates temp files in %LOCALAPPDATA%\Temp. I verified this using process monitor.
I do this on MacOS with the following command and restic switch, often when I’m dealing with a failing drive and don’t want to tax it further than necessary.
On Windows, restic checks both TMP and TEMP, see Manual — restic 0.16.5-dev documentation . (I’ve linked to the “latest” documentation, as that section is incorrect in the “stable” version documentation).
My guess would be that the environment variable somehow wasn’t properly passed on to restic.