The Samba-Bugzilla – Bug 11151
rsync transfers entire source file even when unable to create destination
Last modified: 2015-04-04 08:48:26 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]
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.
Possibly related to #10675