Wow, that's good sleuthing! Are you going to report the bug to the rsync maintainers?
You can work around it by not having your script trust rsync, but to do a sha1 hash on both ends after rsync exits. We
dothis in production because we once encountered a server with bad memory that was mysteriously corrupting the files;
weended up never removing the sha1-comparison code.
Regards,
Dianne.
On February 28, 2018 8:10:59 PM EST, Rui DeSousa <rui.desousa@icloud.com> wrote:
>
>I’ve tested this and it seems that there is a still a bug in rsync
>(rsync version 3.1.2 protocol version 31). I used a 1GB archive
>filesytem to allow for an out of space test case. Not sure of the
>actual cause as it seems to work a few times; however, it then fails
>leaving a truncated file and returning a success code.