Browse Source

Add a "borg_key_file" option for setting the Borg repository key file path (#1166).

Dan Helfman 2 weeks ago
parent
commit
134bf1ebdd
3 changed files with 8 additions and 0 deletions
  1. 1 0
      NEWS
  2. 1 0
      borgmatic/borg/environment.py
  3. 6 0
      borgmatic/config/schema.yaml

+ 1 - 0
NEWS

@@ -7,6 +7,7 @@
    flag.
  * #1150: Fix for a runtime directory error when the configured patterns contain a global exclude.
  * #1161: Fix a traceback (TypeError) in the "check" action with Python 3.14.
+ * #1166: Add a "borg_key_file" option for setting the Borg repository key file path.
  * Add documentation search.
  * Change the URL of the local documentation development server to be more like the production URL.
 

+ 1 - 0
borgmatic/borg/environment.py

@@ -10,6 +10,7 @@ OPTION_TO_ENVIRONMENT_VARIABLE = {
     'borg_files_cache_ttl': 'BORG_FILES_CACHE_TTL',
     'borg_security_directory': 'BORG_SECURITY_DIR',
     'borg_keys_directory': 'BORG_KEYS_DIR',
+    'borg_key_file': 'BORG_KEY_FILE',
     'ssh_command': 'BORG_RSH',
     'temporary_directory': 'TMPDIR',
 }

+ 6 - 0
borgmatic/config/schema.yaml

@@ -419,6 +419,12 @@ properties:
             Path for Borg encryption key files. Defaults to
             $borg_config_directory/keys
         example: /path/to/base/config/keys
+    borg_key_file:
+        type: string
+        description: |
+            Path for the Borg repository key file, for use with a repository
+            created with "keyfile" encryption.
+        example: /path/to/base/config/keyfile
     borg_exit_codes:
         type: array
         items: