improve configuration precedence docs

This commit is contained in:
Thomas Waldmann 2026-02-28 19:46:06 +01:00
parent cf6fd0769d
commit f2bdb689c5
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -1,3 +1,15 @@
Configuration Precedence
~~~~~~~~~~~~~~~~~~~~~~~~
From lowest to highest:
1. Defaults defined in the source code.
2. Default config file (``$BORG_CONFIG_DIR/default.yaml``).
3. ``--config`` file(s) (in the order given).
4. Full config environment variable: (``BORG_CONFIG``).
5. Environment variables (e.g. ``BORG_LOG_LEVEL``).
6. Command-line arguments in order left to right (might include config files).
Configuration files
~~~~~~~~~~~~~~~~~~~
@ -44,12 +56,6 @@ File format
under a subcommand name (e.g. ``create:``) are only applied when that
subcommand is invoked.
Precedence (lowest to highest)
1. Default config file (``$BORG_CONFIG_DIR/default.yaml``)
2. ``--config`` file(s) (in the order given)
3. Environment variables (e.g. ``BORG_REPO``)
4. Command-line arguments
.. note::
``--print_config`` shows the merged effective configuration and is a
convenient way to check what values Borg will actually use, and to