Why RCLONE would discard all the parts of a large file when it failed to upload just one part due to network connection lost?

Not bug. This is by design unfortunately and is clearly documented:

When upload completes, temporary chunk files are finally renamed. This scheme guarantees that operations can be run in parallel and look from outside as atomic. A similar method with hidden temporary chunks is used for other operations (copy/move/rename, etc.). If an operation fails, hidden chunks are normally destroyed, and the target composite file stays intact.

It can be only properly implemented when this PR is finished:

It has been open for years.... If you know go maybe you can help with it.

What it worse with chunker is that chunks can be left behind and stay invisible forever. In your case you use ClientConn.Close so rclone gracefully cleans things. But when termination is more abrupt things will be left behind...

I have just posted workaround for this problem:

1 Like