From 581cc4ea043dd8b89415b1c4aaa97fca0f12d7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Tue, 11 Feb 2025 08:34:36 +0100 Subject: [PATCH 1/2] restic: also send mail to reynir on failure It seems our own mailu instance is unhappy with postfix sending ourselves these backup notifications. --- roles/docker/templates/restic/failure.sh.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/docker/templates/restic/failure.sh.j2 b/roles/docker/templates/restic/failure.sh.j2 index 757f4ed..ddfc752 100644 --- a/roles/docker/templates/restic/failure.sh.j2 +++ b/roles/docker/templates/restic/failure.sh.j2 @@ -1,5 +1,5 @@ #!/bin/sh -curl smtp://{{ smtp_host }} --mail-from {{ services.restic.mail_from }} --mail-rcpt admin@data.coop --upload-file . << END_OF_MAIL +curl smtp://{{ smtp_host }} --mail-from {{ services.restic.mail_from }} --mail-rcpt admin@data.coop --mail-rcpt datacoop-backup@reynir.dk --upload-file . << END_OF_MAIL From: Restic backup <{{ services.restic.mail_from }}> To: admin@data.coop Subject: Restic backup failed From 4ffbbe9ce7a49bf0629335b6ff96c92f59836d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Sun, 22 Dec 2024 12:44:16 +0100 Subject: [PATCH 2/2] Make curl silent in restic scripts Printing curl progress is just silly. --- roles/docker/templates/restic/failure.sh.j2 | 2 +- roles/docker/templates/restic/success.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/docker/templates/restic/failure.sh.j2 b/roles/docker/templates/restic/failure.sh.j2 index ddfc752..2a63d47 100644 --- a/roles/docker/templates/restic/failure.sh.j2 +++ b/roles/docker/templates/restic/failure.sh.j2 @@ -1,5 +1,5 @@ #!/bin/sh -curl smtp://{{ smtp_host }} --mail-from {{ services.restic.mail_from }} --mail-rcpt admin@data.coop --mail-rcpt datacoop-backup@reynir.dk --upload-file . << END_OF_MAIL +curl --silent smtp://{{ smtp_host }} --mail-from {{ services.restic.mail_from }} --mail-rcpt admin@data.coop --mail-rcpt datacoop-backup@reynir.dk --upload-file . << END_OF_MAIL From: Restic backup <{{ services.restic.mail_from }}> To: admin@data.coop Subject: Restic backup failed diff --git a/roles/docker/templates/restic/success.sh.j2 b/roles/docker/templates/restic/success.sh.j2 index 656f85d..24eba7e 100644 --- a/roles/docker/templates/restic/success.sh.j2 +++ b/roles/docker/templates/restic/success.sh.j2 @@ -1,2 +1,2 @@ #!/bin/sh -curl '{{ restic_secrets.uptime_kuma_url }}' +curl --silent '{{ restic_secrets.uptime_kuma_url }}'