diff --git a/docs/configuration/map_filter_syntax.rst b/docs/configuration/map_filter_syntax.rst index 5d152b9..a7bd50b 100644 --- a/docs/configuration/map_filter_syntax.rst +++ b/docs/configuration/map_filter_syntax.rst @@ -1,7 +1,9 @@ +.. include:: ../global.rst.inc + Mapping & Filter Syntax ======================= -For various job types, a filesystem `mapping` or `filter` needs to be +For various job types, a filesystem ``mapping`` or ``filter`` needs to be specified. Both have in common that they take a filesystem path (in the ZFS filesystem hierarchy)as parameters and return something. @@ -13,18 +15,19 @@ Common Pattern Syntax --------------------- A mapping / filter is specified as a **YAML dictionary** with patterns as keys and -results as values.
+results as values. The following rules determine which result is chosen for a given filesystem path: * More specific path patterns win over less specific ones * Non-wildcard patterns (full path patterns) win over *subtree wildcards* (`<` at end of pattern) -The **subtree wildcard** `<` means "*the dataset left of `<` and all its children*". +The **subtree wildcard** ``<`` means "*the dataset left of ``<`` and all its children*". Example ~~~~~~~ :: + # Rule number and its pattern 1: tank< # tank and all its children 2: tank/foo/bar # full path pattern (no wildcard) @@ -43,15 +46,16 @@ Mappings -------- Mappings map a *source filesystem path* to a *target filesystem path*. -Per pattern, either a target filesystem path or `"!"` is specified as a result. +Per pattern, either a target filesystem path or ``"!"`` is specified as a result. -* If no pattern matches, there exists no target filesystem (`NO MATCH`). -* If the result is a `"!"`, there exists no target filesystem (`NO MATCH`). +* If no pattern matches, there exists no target filesystem (``NO MATCH``). +* If the result is a ``"!"``, there exists no target filesystem (``NO MATCH``). * If the pattern is a non-wildcard pattern, the source path is mapped to the target path on the right. -* If the pattern ends with a *subtree wildcard* (`<`), the source path is **prefix-trimmed** with the path specified left of `<`. - * Note: this means that only for *wildcard-only* patterns (pattern=`<` ) is the source path simply appended to the target path. +* If the pattern ends with a *subtree wildcard* (``<``), the source path is **prefix-trimmed** with the path specified left of ``<``. -The example is from the {{< sampleconflink "localbackup/host1.yml" >}} example config. + * Note: this means that only for *wildcard-only* patterns (pattern=``<`` ) is the source path simply appended to the target path. + +The example is from the :sampleconf:`localbackup/host1.yml` example config. :: @@ -66,7 +70,6 @@ The example is from the {{< sampleconflink "localbackup/host1.yml" >}} example c } ... -Results in the following mappings :: @@ -84,13 +87,10 @@ Results in the following mappings Filters ------- -Valid filter results: `ok` or `!`. +Valid filter results: ``ok`` or ``!``. -The example below show the source job from the [tutorial]({{< relref "tutorial/_index.md#configure-app-srv" >}}): - -The client is allowed access to `zroot/var/db`, `zroot/usr/home` + children except `zroot/usr/home/paranoid`. - -:: +The example below show the source job from the :ref:`tutorial `: +The corresponding pull job is allowed access to ``zroot/var/db``, ``zroot/usr/home`` + children except ``zroot/usr/home/paranoid``:: jobs: - name: pull_backup diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 0683971..5b8356f 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -96,6 +96,8 @@ Thus, it is sufficient to create one keypair and use it for all ``connect`` dire Learn more about :ref:`transport-ssh+stdinserver` transport and the :ref:`pull job ` format. +.. _tutorial-configure-app-srv: + Configure ``app-srv`` ---------------------