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.

    OMV7 | Xeon W-1250 | 48 GB | Linux 6.5 PVE

    • Official Post

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

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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

    OMV7 | Xeon W-1250 | 48 GB | Linux 6.5 PVE

  • 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 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Official Post

    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 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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!