mkstemp fails but data still transferred

Phil Howard phil-rsync-2 at ipal.net
Thu Mar 24 09:03:42 GMT 2005


On Tue, Mar 22, 2005 at 11:27:57PM -0600, John Van Essen wrote:

| On Tue, 22 Mar 2005, Steve Harris <sharris at myra.com> wrote:
| > 
| > What seems to be happening is that even though the directory doesn't exist
| > and the temporary file can't be created the data is transferred but
| > not written anywhere
| ....
| > I guess what I'm getting at is that if rsync can't create the temporary
| > file shouldn't it just bail ?
| 
| The Documentation section of the rsync web site has a "How Rsync Works" page:
| 
|   http://rsync.samba.org/how-rsync-works.html
| 
| originally written by the late JW Schultz.
| 
| In the pipeline section you'll see that communication is unidirectional.
| One of rsync's many advantages is streaming unidirectional pipelines.
| Not having two-way chatter helps speed up file transfers.
| 
| Since it is optimized for the normal case where there are no problems
| on the receiving end, the receiver has no way to tell the sender to
| stop sending file content when there is a problem, and must accept and
| discard the remainder of the file (which is what you are seeing).
| Subsequent file transfers might be successful, so it can't abort, yet.
| 
| Hope that helps.

An option to specify action would help more, IMHO.  Since there is no
two-way chatter, the choices are obviously limited.  How about:

  --create-fail-action=discard (default)
  --create-fail-action=mkdir
  --create-fail-action=abort

or some such?

-- 
-----------------------------------------------------------------------------
| Phil Howard KA9WGN       | http://linuxhomepage.com/      http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/   http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


More information about the rsync mailing list