From f2ce2f387f7c41b9514590b417af56bdd0b3bcc5 Mon Sep 17 00:00:00 2001 From: Divyansh Singh Date: Tue, 1 Aug 2023 01:32:06 +0530 Subject: [PATCH] feat: optionally disable config bootstrap --- borgmatic/actions/create.py | 3 ++- borgmatic/config/schema.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/borgmatic/actions/create.py b/borgmatic/actions/create.py index 1d750f62..2fa7978f 100644 --- a/borgmatic/actions/create.py +++ b/borgmatic/actions/create.py @@ -91,7 +91,8 @@ def run_create( borgmatic.hooks.dump.DATABASE_HOOK_NAMES, global_arguments.dry_run, ) - create_borgmatic_manifest(config, global_arguments.used_config_paths, global_arguments.dry_run) + if config.get('store_config_files', True): + create_borgmatic_manifest(config, global_arguments.used_config_paths, global_arguments.dry_run) stream_processes = [process for processes in active_dumps.values() for process in processes] json_output = borgmatic.borg.create.create_archive( diff --git a/borgmatic/config/schema.yaml b/borgmatic/config/schema.yaml index 59e88560..f598c211 100644 --- a/borgmatic/config/schema.yaml +++ b/borgmatic/config/schema.yaml @@ -210,6 +210,13 @@ properties: "borgmatic restore" from finding any database dumps created before the change. Defaults to ~/.borgmatic example: /tmp/borgmatic + store_config_files: + type: boolean + description: | + Store configuration files used to create a backup in the backup + itself. Defaults to true. Changing this to false prevents "borgmatic + bootstrap" from extracting configuration files from the backup. + example: true source_directories_must_exist: type: boolean description: |