Bug 11151 - rsync transfers entire source file even when unable to create destination
rsync transfers entire source file even when unable to create destination
Status: NEW
Product: rsync
Classification: Unclassified
Component: core
3.0.9
All All
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-11 10:41 UTC by Brian Candler
Modified: 2015-04-04 08:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Candler 2015-03-11 10:41:01 UTC
[This is with rsync 3.0.9 under Debian Wheezy]

Using the following command to copy a 2TB file:

    rsync -t --progress /file/on/nfs/source /local/dest

The permissions were wrong on /local to create the file, but the whole 2TB was still read from NFS - hence it took ~6 hours for the command to fail!

The issue is easy to replicate, here with a smaller (4.4GB) file:

$ time rsync /nfs/testfile /etc/dontcare
<< hangs at this point for 16 seconds >>
rsync: mkstemp "/etc/.dontcare.xBvfOf" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]

real	0m16.102s
user	0m19.213s
sys	0m7.396s

You can observe the same problem with a local source file (i.e. not involving NFS), although it needs to be sufficiently large for the problem to be noticeable.
Comment 1 Brian Candler 2015-04-04 08:48:26 UTC
Possibly related to #10675