Exclusion pattern question

Hi all, I am trying to exclude the majority of files in a folder because most of it is log files, but it does contain a config folder that that I want to keep. I created an exclude file and from the documentation, if I read it correctly I thought the code below would exclude all of the .nx folder except .nx/config

/home/**/.nx
!/home/**/.nx/config

however when I look at the snapshot there is no .nx folder. At this point I’m assuming I’m doing something wrong.
Thanks in advance for any help

With your exclude configuration restic never enters the .nx folder and thus the second line never applies. You could try the following:

/home/**/.nx/*
!/home/**/.nx/config

Ok after looking closer at the documentation I was wondering if that might be the case. I’ll edit it and see what happens with tonight’s backup

Thank you that was it, now it’s working as expected!