Whitelisting paths

I’ve seen this thread where if I understand it correctly:

  1. All includes are first applied (even if specified after an exclude)
  2. Excludes are then applied

Given this, how does one whitelist?

Eg, I generally want to exclude all directories called [cC]ache, but I have a particular program called Cache that does cache-y things.

How do I whitelist only this one particular Cache directory?

I haven’t tested this, but maybe you can pass the directory called “Cache” as a second backup target?!
Like restic backup / /home/user/Cache/ --exclude ...

I’m not sure if this is currently possible. One possible workaround would be to backup that folder as a separate snapshot and then you can apply different exclude patterns to it.

1 Like