Suppose, I have some file with path %p which I need to gzip on the fly and send to a remote server and I'm not allowed to use rsync and similar mirroring tools. I do the following:
gzip -c -9 %p | ssh user@server "cat > backupPath"
In the basic normal case it works good, but I'm wondering what happens when the connection to the remote server fails during the file sending because I'd like to be sure the file is fully sent and saved. Will just the part of the file be written to "backupPath" or will it follow the "all or nothing" strategy - i.e. error happens, file with "backupPath" address is not created on the remote host (which is more suitable for me)?