Take a look at THIS THREAD. It took a lot of banging my head against the wall, but I was able to create a system that worked for me that does indeed create exceptions to your exclude rules. You can exclude all and then include specific files or folders, or even exclude a subfolder, but then include specific files or folders within that subfolder. There are gotchas so set up a little test environment and hammer away and you’ll figure it out.
You basically have 3 tools at your disposal, along with various combinations of those tools:
- Go real deep with include and exclude patterns and get really creative implementing them for your own needs
- Create a new snapshot for specific categories of data that follow similar rules and create a different rule set for each snapshot that will snag that specific subset of data.
- Use multiple .kopiaignore files. For example, you can have a global rule (.kopiaignore file that lives at the root of the snapshot source directory) that ignores all .exe files
*.exe
, but then in a specific subfolder you can create another .kopiaignore rule that includes them!*.exe
and in that subfolder it will back up your .exe’s
How you go about it depends on your larger data and backup situation. For example, to grab “Preferences” you should be able to just add the following, but it would grab any instance of the word “Preferences”
*
!**/
*Preferences*
An example of something I later created since posting to the thread linked above: (exclude folder, but still include specific contents)
#put the following at the end of your .kopiaignore file, after your other exclusions
#exclude all contents of "subfolder1"
folder1/subfolder1/**/*[a-z]*/*
##include the following file types inside the previously-excluded, "subfolder1"
!*.prproj
!*.aep
!*.prodset
!*.ai
Hopefully that gives you enough to get started, but it will come down to trial and error. I love kopia, but filter rules are painful and .gitignore documentation is only partially accurate for kopia, as far as I can tell.
Oh, and everything is CASE SENSITIVE, which is painful for my situation and nearly doubles the lines of rules I have to create.