Closed ceremcem closed 8 years ago
I'm not able to reproduce the problem. Temporary files are deleted when I hit Ctrl+C. And according to rsync man this is expected behaviour: --partial option is not enabled by default.
What rsync version are you using on each side?
I have experienced this problem while synchronizing folders that exists in the same computer.
rsync --version
rsync version 3.1.0 protocol version 31
I was able to reproduce the problem. It's an rsync bug.
truncate -s100M bigfile
timeout 0.3s rsync -av bigfile bigfile2
ls -ltra
Seems it's already fixed in rsync release candidate: http://rsync.samba.org/ftp/rsync/src-previews/rsync-3.1.1pre1-NEWS
It will be fixed in rsync 3.1.1 Maybe I will think of a workaround.
If we interrupt synchronization by using Ctrl+C, temporary files that are used by rsync are left in the filesystem. Once we restart sync process, this tmp file is propagated between folders.
Maybe bsync should use a temporary folder to copy the file, and then use mv. That will be atomic.