Ok to set RESTIC_CACHE_DIR to external drive?

Is it a bad idea to put the huge RESTIC_CACHE_DIR on an external SSD?
I’m wondering if there are performance implications and/or robustness implications (I sometimes accidentally unplug the drive without properly stopping restic and ejecting the disk)

restic 0.18.0 compiled with go1.24.2 on darwin/arm64

It’s fine to do that. You will be bound by the performance of accessing that disk instead of accessing whatever else you’d put the cache dir on otherwise.

2 Likes

It is even recommended to put it on ram-disk. Restic will initialize it every time it got lost after a reboot.
export RESTIC_CACHE_DIR=/dev/shm/restic-cache

1 Like

Really? That seems strange to me. I don’t know the technical details but I would have guessed that’s equivalent to running with --no-cache

Clearly --no-cache and cache somewhere (RAM, internal disk, external disk) is not the same:)

As long as your cache location is faster than your remote access you will see its benefits.

IMO using RAM for restic cache is wasteful but of course possible.

oh yeah makes sense. brain fart

Using RAM makes sense if you make several backups/query in succession before the ramdisk is deleted. If you only access the Repository once, then of course it is unnecessary.