From 638cd4199533c5e116029034d5ccbd0e4f275a11 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 4 Feb 2018 11:49:20 +0100 Subject: [PATCH] also log failed target --- modules/roles/files/postgresql_server/pg-backup-file | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/roles/files/postgresql_server/pg-backup-file b/modules/roles/files/postgresql_server/pg-backup-file index 08e6d383b..ce6d09836 100755 --- a/modules/roles/files/postgresql_server/pg-backup-file +++ b/modules/roles/files/postgresql_server/pg-backup-file @@ -59,7 +59,7 @@ size="`stat -c '%s' "$file"`" checksum="" bn="`basename "$file"`" targetname="$cluster.$what.$bn" -logtuple="($myhost,$targetname,$size,$checksum)" +logtuple_start="($myhost,$targetname,$size,$checksum" failures="" for target in $backuphost; do @@ -72,7 +72,7 @@ for target in $backuphost; do ssh -C "$target" $ssh_options -o BatchMode=yes -o ServerAliveInterval=90 $myhost store-file pg "$targetname" "$size" "$checksum" < "$file" if [ "$?" != 0 ]; then - failures="$failures $logtuple" + failures="$failures $logtuple_start,$target)" fi fi done -- 2.20.1