From b6adc53746187a1a05ab829ad847e41436c5908a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 28 Jun 2021 08:33:08 +0100 Subject: [PATCH] Revert "Capture stderr in logs, too" This reverts commit 8696f6d93f72057d93c0d8d523439a36452eb2d0. Yeah, this doesn't work. Syntax and intention. --- ansible/roles/restic/files/backrest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/restic/files/backrest.sh b/ansible/roles/restic/files/backrest.sh index 21e9911..946434d 100644 --- a/ansible/roles/restic/files/backrest.sh +++ b/ansible/roles/restic/files/backrest.sh @@ -17,7 +17,7 @@ mkdir -p "$RESTIC_LOG_DIR" # Run backup, and capture logs to file cron_backup() { curl -fsS -m 10 --retry 5 -o /dev/null {{ healthchecks_host }}/{{ restic_healthchecks_id }}/start - restic --verbose backup {{ restic_backup_locations|join(' ') }} &> | tee -a $RESTIC_LOG_FILE + restic --verbose backup {{ restic_backup_locations|join(' ') }} | tee -a $RESTIC_LOG_FILE exit_code=${PIPESTATUS[0]} curl -fsS -m 10 --retry 5 -o /dev/null {{ healthchecks_host }}/{{ restic_healthchecks_id }}/$exit_code --data-binary "@$RESTIC_LOG_FILE" echo "Exit code: $exit_code" @@ -32,7 +32,7 @@ backup() { # Run forget and prune, and capture logs to file cron_forget() { curl -fsS -m 10 --retry 5 -o /dev/null {{ healthchecks_host }}/{{ restic_forget_healthchecks_id }}/start - restic forget --prune $FORGET_OPTIONS &> | tee -a $RESTIC_LOG_FILE + restic forget --prune $FORGET_OPTIONS | tee -a $RESTIC_LOG_FILE exit_code=${PIPESTATUS[0]} curl -fsS -m 10 --retry 5 -o /dev/null {{ healthchecks_host }}/{{ restic_forget_healthchecks_id }}/$exit_code --data-binary "@$RESTIC_LOG_FILE" echo "Exit code: $exit_code"