瀏覽代碼

Clarify documentation on configuration overrides, specifically the portion about list syntax.

Dan Helfman 4 年之前
父節點
當前提交
99590cb6b6
共有 3 個文件被更改,包括 20 次插入3 次删除
  1. 4 0
      NEWS
  2. 15 2
      docs/how-to/make-per-application-backups.md
  3. 1 1
      setup.py

+ 4 - 0
NEWS

@@ -1,3 +1,7 @@
+1.5.10.dev0
+ * Clarify documentation on configuration overrides, specifically the portion about list syntax:
+   http://localhost:8080/docs/how-to/make-per-application-backups/#configuration-overrides
+
 1.5.9
 1.5.9
  * #300: Add "borgmatic export-tar" action to export an archive to a tar-formatted file or stream.
  * #300: Add "borgmatic export-tar" action to export an archive to a tar-formatted file or stream.
  * #339: Fix for intermittent timing-related test failure of logging function.
  * #339: Fix for intermittent timing-related test failure of logging function.

+ 15 - 2
docs/how-to/make-per-application-backups.md

@@ -129,12 +129,12 @@ Whatever the reason, you can override borgmatic configuration options at the
 command-line via the `--override` flag. Here's an example:
 command-line via the `--override` flag. Here's an example:
 
 
 ```bash
 ```bash
-borgmatic create --override location.remote_path=borg1
+borgmatic create --override location.remote_path=/usr/local/bin/borg1
 ```
 ```
 
 
 What this does is load your configuration files, and for each one, disregard
 What this does is load your configuration files, and for each one, disregard
 the configured value for the `remote_path` option in the `location` section,
 the configured value for the `remote_path` option in the `location` section,
-and use the value of `borg1` instead.
+and use the value of `/usr/local/bin/borg1` instead.
 
 
 Note that the value is parsed as an actual YAML string, so you can even set
 Note that the value is parsed as an actual YAML string, so you can even set
 list values by using brackets. For instance:
 list values by using brackets. For instance:
@@ -143,9 +143,22 @@ list values by using brackets. For instance:
 borgmatic create --override location.repositories=[test1.borg,test2.borg]
 borgmatic create --override location.repositories=[test1.borg,test2.borg]
 ```
 ```
 
 
+Or even a single list element:
+
+```bash
+borgmatic create --override location.repositories=[/root/test1.borg]
+```
+
 There is not currently a way to override a single element of a list without
 There is not currently a way to override a single element of a list without
 replacing the whole list.
 replacing the whole list.
 
 
+Note that if you override an option of the list type (like
+`location.repositories`), you do need to use the `[ ]` list syntax. See the
+[configuration
+reference](https://torsion.org/borgmatic/docs/reference/configuration/) for
+which options are list types. (YAML list values look like `- this` with an
+indentation and a leading dash.)
+
 Be sure to quote your overrides if they contain spaces or other characters
 Be sure to quote your overrides if they contain spaces or other characters
 that your shell may interpret.
 that your shell may interpret.
 
 

+ 1 - 1
setup.py

@@ -1,6 +1,6 @@
 from setuptools import find_packages, setup
 from setuptools import find_packages, setup
 
 
-VERSION = '1.5.9'
+VERSION = '1.5.10.dev0'
 
 
 
 
 setup(
 setup(