# we use tar over SSH as I don't fully trust scp's exit status. The added benefit is that tar preserves all attributes # the downside is that it's a little tricky to make the remote path relative tar -c -O --no-same-owner -C "${WAL_SEGMENT%/*}" "${WAL_SEGMENT##*/}" | ssh -p ${NEXT_PORT} -C -o 'BatchMode=yes' -o 'CompressionLevel=3' "${USER}@${NEXT_HOST}" "exec tar -x --no-same-owner --overwrite -C '${WAL_ARCHIVE_PATH}'"; PS_CONCAT="${PIPESTATUS[*]}";
The script is complex, but as I said, nothing has been changed on it.