# Please help me understand --add-ignore vs --add-dot-ignore kopia

**URL:** <https://kopia.discourse.group/t/please-help-me-understand-add-ignore-vs-add-dot-ignore-kopia/1448>\
**Category:** General\
**Created:** [September 30, 2022, 10:24am UTC](https://kopia.discourse.group/t/please-help-me-understand-add-ignore-vs-add-dot-ignore-kopia/1448 "2022-09-30T10:24:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ovizii](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ovizii/32/431_2.png) [@ovizii](https://kopia.discourse.group/u/ovizii)\
**Post date:** [September 30, 2022, 10:24am UTC](https://kopia.discourse.group/t/please-help-me-understand-add-ignore-vs-add-dot-ignore-kopia/1448/1 "2022-09-30T10:24:47Z")

</div>

–add-ignore vs --add-dot-ignore kopia - can somebody explain the difference?

The docs are not enough. What is the dot-ignore list? What is the use case of each of these two options? [policy set | Kopia](https://kopia.io/docs/reference/command-line/common/policy-set/)

---

<div class="post-metadata">

**Author:** ![stpr](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@stpr](https://kopia.discourse.group/u/stpr)\
**Post date:** [October 3, 2022, 3:32am UTC](https://kopia.discourse.group/t/please-help-me-understand-add-ignore-vs-add-dot-ignore-kopia/1448/2 "2022-10-03T03:32:28Z")

</div>

This is a good question, and I think it is a good place to discuss this and perhaps eventually submit a PR on GitHub to clear this issue.

From my understanding, `--add-ignore` is a straightforward rule: ignore this file/directory. However, Kopia also supports a `.kopiaignore` format (see [[Document the .kopiaignore format · Issue #1945 · kopia/kopia · GitHub](https://github.com/kopia/kopia/issues/1945)]) file which acts very much like a `.gitignore` file. When placed in the snapshot path, Kopia parses the file and then determines which files/directories to ignore. Much like the aforementioned `.gitignore`, you can do all sorts of tricks like pattern matching, globbing, conditionals, etc. My understanding is that `--add-dot-ignore` appends to this list, so that you can add stuff to it using the cli interface.

The _effect_ for simple cases using both is similar: a certain set of paths are excluded. But `.kopiaignore` is much less hard-coded in that it is not fundamentally tied to your repository configuration. You can nuke the file without having any changes in your repository configuration. On the other hand, `--add-ignore` is part of your repository configuration, but is also simpler to use since it doesn’t do all the fancy stuff that the other option does.

@jkowalski can perhaps verify/clarify this, and I can work towards maybe submitting a PR on the docs.
