SnapRAID exclude folders using wildcards

  • I'm trying to set up an exclude rule for any and all "cache" folders, but I'm getting the following error


    Invalid 'exclude' specification '**/cache/' in '/etc/snapraid.conf' at line 40
    Filters using relative paths are not supported. Ensure to add an initial slash


    Is there any way I can do this without defining a path to each folder?


    I've tried adding the initial slash like this /**/cache/, but that didn't work.

  • Why are you putting to * in the rule? /*/cache/ should work.

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Thanks, that helped and I was able to get it working. But it raised another question, is there a way to set a single rule to find a folder named "cache" at any depth? e.g. /foo/cache or /foo/bar/cache

  • well that was stupefyingly easy, thanks.

    Well, that came from the SnapRAID manual, and the plugin accepts it. But see if it works you run SnapRAID. I know I tried something that was in the manual that didn't work. I just don't remember what it was.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

  • The plugin only parses for one situation that is illegal with snapraid - https://github.com/OpenMediaVa…ned/rpc/snapraid.inc#L209 There may be others that the plugin accepts but aren't legal with snapraid.

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!