Hi all, I'm running rsync version 2.6.3 protocol version 28 on Solaris 8 and am having a problem. We have some scripts that wrap around rsync and generate a list of files to transfer from the sending system (regardless of whether that directory exists on the receiver). I was expecting rsync to fail when transferring files with a path that doesn't exist on the receiver (in fact that's what I want it to do and I'm not worried about error messages). 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 anywher e.g. /usr/local/bin/rsync --stats -lptgoDvxe ssh sender:/source_dir/ORACLE/dsk03/ORACLE/DIR/somefile.dbf /dest_dir/dsk03/ORACLE/DIR/somefile.dbf rsync: mkstemp "/data00/dsk03/ORACLE/DIR/.somefile.jDaGKh" failed: No such file or directory (2) Number of files: 1 Number of files transferred: 1 Total file size: 839917568 bytes Total transferred file size: 839917568 bytes Literal data: 839917568 bytes Matched data: 0 bytes File list size: 69 Total bytes sent: 36 Total bytes received: 840020225 sent 36 bytes received 840020225 bytes 2654092.45 bytes/sec total size is 839917568 speedup is 1.00 rsync error: some files could not be transferred (code 23) at main.c(1146) An lsof of the rsync processes showed that no file was opened (apart from stdin, stdout, stderr and some sockets) that looked like the destination file. However a snoop confirms that data was being transferred from the sender to the receiver. I guess what I'm getting at is that if rsync can't create the temporary file shouldn't it just bail ? Any info would be greatfully received. Cheers - Steve =======================================================================He didn't administer a reign of terror, just the occasional light shower. - Terry Pratchett, Sourcery
Follow up ; I'm no C programmer but looking at the receiver.c source and it appears that the data does just get discarded (look at the receive_data function for more info), static void discard_receive_data(int f_in, OFF_T length) { receive_data(f_in, NULL, -1, 0, NULL, -1, length); } I'm confused why this is the case - is there a reason why this is done ? Cheers all - Steve He didn't administer a reign of terror, just the occasional light shower. - Terry Pratchett, Sourcery On Tue, 22 Mar 2005, Steve Harris wrote:> Hi all, > > I'm running rsync version 2.6.3 protocol version 28 on Solaris 8 and am > having a problem. > > We have some scripts that wrap around rsync and generate a list of files > to transfer from the sending system (regardless of whether that directory > exists on the receiver). I was expecting rsync to fail when transferring > files with a path that doesn't exist on the receiver (in fact that's > what I want it to do and I'm not worried about error messages). > > 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 anywher e.g. > > /usr/local/bin/rsync --stats -lptgoDvxe ssh > sender:/source_dir/ORACLE/dsk03/ORACLE/DIR/somefile.dbf > /dest_dir/dsk03/ORACLE/DIR/somefile.dbf > > rsync: mkstemp "/data00/dsk03/ORACLE/DIR/.somefile.jDaGKh" > failed: No such file or directory (2) > > Number of files: 1 > Number of files transferred: 1 > Total file size: 839917568 bytes > Total transferred file size: 839917568 bytes > Literal data: 839917568 bytes > Matched data: 0 bytes > File list size: 69 > Total bytes sent: 36 > Total bytes received: 840020225 > > sent 36 bytes received 840020225 bytes 2654092.45 bytes/sec > total size is 839917568 speedup is 1.00 > rsync error: some files could not be transferred (code 23) at main.c(1146) > > An lsof of the rsync processes showed that no file was opened (apart from > stdin, stdout, stderr and some sockets) that looked like the destination > file. However a snoop confirms that data was being transferred from the > sender to the receiver. > > I guess what I'm getting at is that if rsync can't create the temporary > file shouldn't it just bail ? > > Any info would be greatfully received. > > Cheers - Steve > > =======================================================================> He didn't administer a reign of terror, just the occasional light shower. > - Terry Pratchett, Sourcery > -- > To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html >
On Tue, 22 Mar 2005, Steve Harris <sharris@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. -- John Van Essen Univ of Minn. Alumnus <vanes002@umn.edu>
Reasonably Related Threads
- mkstemp error (only a problem with newer rsync versions)
- rsync reports "some files could not be transferred" (code 23) when problems occur with password-file
- Symlinks out of sharing still not working on 3.0.5
- [Bug 8130] New: ACL and link-dest do not work together
- Downloading a directory of text files into R