From 4ddfba9bdd7a27944a6b3aeb669620a2685bfb6d Mon Sep 17 00:00:00 2001 From: "pulsar89.5" Date: Wed, 19 Jun 2024 11:13:00 +0200 Subject: [PATCH] feat: Allow to backup mariadb --- defaults/main.yml | 1 + templates/config.yaml.j2 | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 76c74bf..1f5cc2c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -34,4 +34,5 @@ borgmatic_passphrase: "" borgmatic_actions: {} +borgmatic_mariadb_enabled: false borgmatic_restore_first: false diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 4549a71..25b0b95 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -32,9 +32,9 @@ checks: healthchecks: ping_url: {{ borgmatic_healthchecks }} send_logs: false - states: - - finish - - fail +# states: +# - finish +# - fail {% if borgmatic_retention | length > 0 %} {% for param, value in borgmatic_retention.items() %} @@ -50,3 +50,10 @@ keep_{{ param }}: {{ value }} {% endfor %} {% endfor %} {% endif %} + +{% if borgmatic_mariadb_enabled | length > 0 %} +mariadb_databases: + - name: all + format: sql + add_drop_database: true +{% endif %}