add option to set borg_files_cache_ttl in config

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
This commit is contained in:
Soumik Dutta 2023-03-18 01:48:24 +05:30
parent e6605c868d
commit 0db137efdf
2 changed files with 8 additions and 1 deletions

View file

@ -2,6 +2,7 @@ OPTION_TO_ENVIRONMENT_VARIABLE = {
'borg_base_directory': 'BORG_BASE_DIR', 'borg_base_directory': 'BORG_BASE_DIR',
'borg_config_directory': 'BORG_CONFIG_DIR', 'borg_config_directory': 'BORG_CONFIG_DIR',
'borg_cache_directory': 'BORG_CACHE_DIR', 'borg_cache_directory': 'BORG_CACHE_DIR',
'borg_files_cache_ttl': 'BORG_FILES_CACHE_TTL',
'borg_security_directory': 'BORG_SECURITY_DIR', 'borg_security_directory': 'BORG_SECURITY_DIR',
'borg_keys_directory': 'BORG_KEYS_DIR', 'borg_keys_directory': 'BORG_KEYS_DIR',
'encryption_passcommand': 'BORG_PASSCOMMAND', 'encryption_passcommand': 'BORG_PASSCOMMAND',
@ -27,7 +28,7 @@ def make_environment(storage_config):
value = storage_config.get(option_name) value = storage_config.get(option_name)
if value: if value:
environment[environment_variable_name] = value environment[environment_variable_name] = str(value)
for ( for (
option_name, option_name,

View file

@ -315,6 +315,12 @@ properties:
Path for Borg cache files. Defaults to Path for Borg cache files. Defaults to
$borg_base_directory/.cache/borg $borg_base_directory/.cache/borg
example: /path/to/base/cache example: /path/to/base/cache
borg_files_cache_ttl:
type: integer
description: |
Maximum time to live (ttl) for entries in the borg files
cache.
example: 20
borg_security_directory: borg_security_directory:
type: string type: string
description: | description: |