checksum=""
bn="`basename "$file"`"
targetname="$cluster.$what.$bn"
-logtuple="($myhost,$targetname,$size,$checksum)"
+logtuple_start="($myhost,$targetname,$size"
+failures=""
for target in $backuphost; do
if [ "${target#/}" != "$target" ]; then
[ -n "$checksum" ] || checksum="`sha512sum "$file" | awk '{print $1}'`"
info "Archiving to $target: ($myhost,$targetname,$size,$checksum)"
- ssh -C "$target" $ssh_options $myhost store-file pg "$targetname" "$size" "$checksum" < "$file"
+ ssh -C "$target" $ssh_options -o BatchMode=yes -o ServerAliveInterval=90 $myhost store-file pg "$targetname" "$size" "$checksum" < "$file"
if [ "$?" != 0 ]; then
- croak "remote store for $logtuple failed."
+ failures="$failures $logtuple_start,$checksum,$target)"
fi
fi
done
+if [ "$failures" != "" ]; then
+ croak "remote store for$failures failed."
+fi