"files noParentIgnore"


On the UI you can set this option

"files": {"noParentIgnore": true}

What is the corresponding command for the command line?

And what does this option do? On the UI it says “Ignore Parent Rules”, but I could not tell a difference, the file parent rules are always inherited, if there are no file ignore rules.

Looks like there’s no CLI equivalent (forgot to add it).

noParentIgnore causes ignore rules to stop at the level where the policy is defined and not inherit from parent.

For example if:

  • /root ignores *.a
  • /root/subdir - ignores *.b - both *.a and *.b will be ignored via inheritance
  • /root/subdir/subdir2 - ignores *.c but with noParentIgnore=true - only *.c will be ignored but *.a and *.b will be snapshotted

Yes, that is what I expected

Let’s say you have ignore rules in /root but no ignore rules in root/subdir and noParentIgnore=true. If you do a policy show on /root/subdir, should it list the ignore rules defined in /root?

Here is small repro to demonstrate the bug:

kopia repository create filesystem --path w:\parent

kopia maintenance set --enable-full=false
kopia maintenance set --enable-quick=false
kopia cache set --content-cache-size-mb=1000
kopia cache set --metadata-cache-size-mb=1000
kopia policy set --global --ignore-cache-dirs=false 
kopia policy set --global --compression=zstd
kopia policy set --global --log-dir-snapshotted=0
kopia policy set --global --log-dir-ignored=10
kopia policy set --global --log-entry-snapshotted=0
kopia policy set --global --log-entry-ignored=10

kopia policy set C:\ --add-ignore="/temp/"

Set "ignore parent rules" with UI  for folder C:\ProgramData (not possible via cmd line)

kopia policy show C:\ProgramData


  Ignore rules:
    /temp/                         inherited from C:\

The parent rule is not ignored.

This could be just a display artifact/bug. Does the parent rule have effect here?


trying to get 20 characters…

Just tested this with 0.9.7. The bug is still present. If the cli version was added, I am not able to find it. (What is the name of the command-line parameter?)