From 525bcda24970455f4e2cc6b4ce58ae15f945f037 Mon Sep 17 00:00:00 2001 From: akul <0xfabc@gmail.com> Date: Mon, 11 Aug 2025 09:34:35 +0400 Subject: [PATCH] Add borg repo label --- meta/argument_specs.yml | 4 ++++ templates/config.yaml.j2 | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index 55e224f..8d14e28 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -67,6 +67,10 @@ argument_specs: Your own server or [BorgBase.com](https://www.borgbase.com) repo. Not required when using auto creation of repositories. Can be a list if you want to backup to multiple repositories. + borg_repository_label: + type: str + required: false + description: Label for the repository. borgmatic_store_atime: type: bool required: false diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 65d310e..6e33def 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -19,9 +19,15 @@ repositories: {% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %} {% for repo in borg_repository %} - path: {{ repo }} + {% if borg_repository_label is defined and borg_repository_label is string %} + label: {{ borg_repository_label }} + {% endif %} {% endfor %} {% elif borg_repository is defined and borg_repository is string %} - path: {{ borg_repository }} +{% if borg_repository_label is defined and borg_repository_label is string %} + label: {{ borg_repository_label }} +{% endif %} {% endif %} # Store atime into archive.