I am using rsync (version 3.1.0 on a centos) to do some backup task. I develop a software that monitor my rsync processes to fit the backup configuration to my buisness logic.
My software launch some rsync processes, and parse rsync's output to send notifications.
I am facing something strange.
My destination disk is full. My software launch an rsync backup on that disk with the following command :
rsync -irlpt --no-perms --stats /src /media/dst/
/media/dst is an external USB3 hard drive mounted in fuseblck (NTFS).
/src is a folder conataining 50 G bytes of pictures, movies, and some text files.
Because this disk is full I would like rsync to exit quickly returning an error.
But, rsync process take a very long time. ( I stopped it manually after 10 hours) When I stopped it I can read a lot of trace like this one :
rsync: mkstemp "/media/dst/.20160518-130315-underwaterposition-VI_GAPS.pos.DIksdT" failed: No space left on device (28)
For me this message is normal because there is no space left on device.
So my questions are :
Why does rsync doesn't stop as soon as it detect that there is no space left on destination device ?
Is there a way to force this behavior ?