diff --git a/docs/install/usage.md b/docs/install/usage.md index 1a9fc1c..51a2d73 100644 --- a/docs/install/usage.md +++ b/docs/install/usage.md @@ -43,6 +43,8 @@ You can replicate the whole dataset or specific namespaces - databases and colle To include or exclude a specific database and all collections it includes, pass it in the format `mydb.*`. +When both include and exclude filters are used, the exclude filter takes precedence. For instance, if you include all collections in the `mydb` database but exclude `mydb.users`, PCSM will replicate all collections from `mydb` **except** `mydb.users`. + === "Command line" ```{.bash data-prompt="$"} diff --git a/docs/pcsm-commands.md b/docs/pcsm-commands.md index b28416f..17eee81 100644 --- a/docs/pcsm-commands.md +++ b/docs/pcsm-commands.md @@ -46,7 +46,7 @@ Available flags: | Name | Description| | -----| -----------| | `--include-namespaces` | Replicate only the specified namespaces. Multiple namespaces are supported as a comma separated list. The number of namespaces to specify is unlimited| -| `--exclude-namespaces` | Replicate everything except the specified namespaces. Multiple namespaces are supported as a comma separated list. The number of namespaces to specify is unlimited| +| `--exclude-namespaces` | Replicate everything except the specified namespaces. Multiple namespaces are supported as a comma separated list. The number of namespaces to specify is unlimited.
When both `--include-namespaces` and `--exclude-namespaces` flags are specified, the exclude filters take precedence. For example, if the `--include-namespaces` includes `db1.*` and `--exclude-namespaces` has `db1.users`, {{pcsm.short}} syncs all collections of `db1` **except** `db1.users`.| ### reset