From 2b5a5aea46f0bdfe7348bf69a62a41767edaa334 Mon Sep 17 00:00:00 2001 From: Konstantin Gizdov Date: Wed, 9 Dec 2020 17:58:51 +0200 Subject: [PATCH] allow configuring of archive format --- templates/config.yaml.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index a5bcf27..60c44a7 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -94,7 +94,11 @@ storage: # also specify a prefix in the retention section to avoid accidental pruning of # archives with a different archive name format. And you should also specify a # prefix in the consistency section as well. +{% if borg_archive_name_format is defined %} + archive_name_format: '{{ borg_archive_name_format | replace("'", "") }}' +{% else %} archive_name_format: '{hostname}-{now:%Y-%m-%d-%H%M%S}' +{% endif %} # Bypass Borg error about a repository that has been moved. relocated_repo_access_is_ok: {{ borgmatic_relocated_repo_access_is_ok }}