Sure. Earlier in the script I set:
Then later I call restic multiple times. Here’s one:
restic --tag IIS backup C:\inetpub D:\HTTP "C:\Windows\System32\inetsrv\config"
Since the B2_ and RESTIC_ variables are required for restic to run, I am confident that all the variables have been set correctly. I also tried pasting each command at the command line, running restic, and then verifying the environment variables are still set correctly.
I deleted the current cache (in case restic checks in the default location for a cache first), then ran restic and this is the output:
repository fee88442 opened successfully, password is correct
created new cache in C:\Users\daveadmin\AppData\Local\restic
Files: 0 new, 1 changed, 287 unmodified
Dirs: 0 new, 1 changed, 4 unmodified
Added to the repo: 486.756 KiB
processed 288 files, 26.162 MiB in 1:13
snapshot b1a2475c saved
D:\restic-cache does exist, permissions are good, but it remains empty.