From 49259ce2ac040754f0fd7a0045950b17ba9235ed Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen.haas@lakedrops.com> Date: Mon, 1 Aug 2022 10:52:39 +0200 Subject: [PATCH] ansible/roles/borgbackup#2 Fix mysql backup in apps and update alerta command --- templates/app.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/app.yaml b/templates/app.yaml index f0a49a7..c2a35eb 100644 --- a/templates/app.yaml +++ b/templates/app.yaml @@ -36,10 +36,12 @@ hooks: port: 3306 username: '{{ application_id }}' password: '{{ application_id }}' - options: '--skip-comments' + options: '--skip-comments --no-tablespaces' before_backup: - echo "`date` - Starting backup" after_backup: - echo "`date` - Finished backup" +{% if alerta_apikey is defined %} on_error: - - /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}' + - echo -n '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}' | nc -u -w1 alerta {{ alerta_proxy_port|default(20002) }} +{% endif %} -- GitLab