Is there any documentation for exclusion/ignore?

I’ve tried to search for it but found nothing, CLI help only says patterns like we magically now what patterns work and which don’t, what does it accepts, does regex works? do wildcards work? Please add this info to the docs.

Also, what is the syntax for the kopiaignore file? There is no mention of it in the documentation.


This sounds like kopiaignore is using gitignore syntax:

1 Like

Thank you, it would be great to have at least a reference in the documentation that kopiaignore uses same syntax than gitignore.

I’m using the GUI now and in the “Ignore Rule Files” field I have entered the full path to a txt file that has ignore rules based on the git syntax which is pretty simple, I just have a bunch of relative paths (relative to the root of the snapshot not relative to where the ignore file is) i.e.: XYZ\ABC\ but kopia is not using it, it’s ignoring my ignore file, what I’m I doing wrong?
Do I need to put the ignore file into the root directory of the snapshot or I must name it .kopiaignore? I don’t want to do neither of those two things.

Anyone can help? @jkowalski can you please take a look at this? I’ve tried these strings:

The snapshot root path is “C:\Folder A

  • /Folder B/Folder C/

  • Folder B/Folder C/**

  • Folder B/Folder C/

None of them work.
The ignore filename is not .kopiaignore and it is located on a different folder than the snapshot root directory. I added the path to Ignore Rule Files in the GUI. As far as I’ve read the 3 types I tried should be working.

It seems I’m misunderstanding that option or there is a bug. I tried copying the file to the snapshot root dir and renaming it to .kopiaignore and it works (btw creating a symbolic link and renaming didn’t worked, I had to copy the file, is this intended?). Does that option in the GUI works for specifying ignore files? I have a bunch of other paths where I want to exclude files/folders and I don’t want to create the .kopiaignore file in every each one of them, restic allows specifying a file containing the exclude rules, was hoping there was a similar feature for kopia.

Judging by the description of “Ignore Rule Files” you can add filenames additionally to .kopiaignore but the files are expected to be in the root directory of your snapshots or its subdirectories. At least that’s my interpretation.

1 Like