.kopiaignore negation not working as expected

Given the following directory structure:

parent/
   .kopiaignore
   child1/
   child2/
     .kopiaignore
      grandchild1/
      grandchild2/
      grandchild3/
   child3/

where parent/.kopiaignore contains:

/child3

and child3/.kopiaignore contains:

*
!grandchild1/
!grandchild2/

When I run “kopia snapshot /parent” I would expect my snapshot to contain the following structure.

parent/
  .kopiaignore
   child1/
   child2/
      .koipaignore
      grandchild1/
      grandchild2/

However, child2 and its contents are not included in the snapshot.

p.s. this is a simplified illustration of what I am trying to achieve which is essentially exclude everything in a child directory except what I implicitly wish to include.

1 Like