Set ServerAliveInterval and BatchMode on ssh to backuphost
[mirror/dsa-puppet.git] / modules / roles / files / postgresql_server / pg-backup-file
index 4b6f7d3..ff2a493 100755 (executable)
@@ -69,7 +69,7 @@ for target in $backuphost; do
                [ -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."
                fi