Hmmm... I think I found it. --local-no-check-updated makes a difference.
Here are my two tests:
a.) rclone.exe sync test backup --delete-before --retries 1 -v -v
b.) rclone.exe sync test backup --delete-before --local-no-check-updated -v -v
a.)
When I run this command it works as expected so far (still testing).
b.)
What did not work as expected is this command.
The low level retries don't happen in this case.
What also isn't as I would expected it is that an error occurs when the file is in use:
test.txt: corrupted on transfer: sizes differ 1652614 vs 1836843
Here are the detailed logs. I wrote a small test program, which modified the file test.txt
-- Daniel
2019/12/31 20:46:10 DEBUG : rclone: Version "v1.50.2" starting with parameters ["d:\rclone\rclone.exe" "sync" "test" "backup" "--delete-before" "--retries" "1" "-v" "-v"]
2019/12/31 20:46:10 DEBUG : Using config file from "C:\Users\nsh\.config\rclone\rclone.conf"
2019/12/31 20:46:10 INFO : Waiting for deletions to finish
2019/12/31 20:46:10 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for checks to finish
2019/12/31 20:46:10 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for transfers to finish
2019/12/31 20:46:10 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for checks to finish
2019/12/31 20:46:10 DEBUG : test.txt: Sizes differ (src 1050256 vs dst 682370)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 1/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 2/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 3/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 4/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 5/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 6/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 7/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 8/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 9/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : linux7.mak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:46:10 DEBUG : linux7.mak: Unchanged skipping
2019/12/31 20:46:10 DEBUG : mswin32.mak.bak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:46:10 DEBUG : mswin32.mak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:46:10 DEBUG : mswin32.mak: Unchanged skipping
2019/12/31 20:46:10 DEBUG : nshwrite.c.bak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:46:10 DEBUG : nshwrite.c.bak: Unchanged skipping
2019/12/31 20:46:10 DEBUG : mswin32.mak.bak: Unchanged skipping
2019/12/31 20:46:10 DEBUG : nshwrite.exe: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:46:10 DEBUG : nshwrite.exe: Unchanged skipping
2019/12/31 20:46:10 DEBUG : nshwrite.obj: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:46:10 DEBUG : nshwrite.obj: Unchanged skipping
2019/12/31 20:46:10 DEBUG : nshwrite.c: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:46:10 DEBUG : nshwrite.c: Unchanged skipping
2019/12/31 20:46:10 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for transfers to finish
2019/12/31 20:46:10 DEBUG : test.txt: Reopening on read failure after 0 bytes: retry 10/10: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 DEBUG : test.txt: Reopen failed after 0 bytes read: failed to reopen: too many retries
2019/12/31 20:46:10 NOTICE: test.txt: Removing partially written file on error: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 ERROR : test.txt: Failed to copy: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 ERROR : Attempt 1/1 failed with 3 errors and: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:46:10 Failed to sync with 3 errors: last error was: can't copy - source file is being updated (size changed from 1050256 to 1133996)
2019/12/31 20:55:30 DEBUG : rclone: Version "v1.50.2" starting with parameters ["d:\rclone\rclone.exe" "sync" "test" "backup" "--delete-before" "--local-no-check-updated" "-v" "-v"]
2019/12/31 20:55:30 DEBUG : Using config file from "C:\Users\nsh\.config\rclone\rclone.conf"
2019/12/31 20:55:30 INFO : Waiting for deletions to finish
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for checks to finish
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for transfers to finish
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for checks to finish
2019/12/31 20:55:30 DEBUG : linux7.mak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : linux7.mak: Unchanged skipping
2019/12/31 20:55:30 DEBUG : mswin32.mak.bak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.exe: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.exe: Unchanged skipping
2019/12/31 20:55:30 DEBUG : mswin32.mak.bak: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.c: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.c: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.c.bak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.c.bak: Unchanged skipping
2019/12/31 20:55:30 DEBUG : mswin32.mak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : mswin32.mak: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.obj: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.obj: Unchanged skipping
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for transfers to finish
2019/12/31 20:55:30 ERROR : test.txt: corrupted on transfer: sizes differ 1652614 vs 1836843
2019/12/31 20:55:30 INFO : test.txt: Removing failed copy
2019/12/31 20:55:30 ERROR : Attempt 1/3 failed with 3 errors and: corrupted on transfer: sizes differ 1652614 vs 1836843
2019/12/31 20:55:30 INFO : Waiting for deletions to finish
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for checks to finish
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for transfers to finish
2019/12/31 20:55:30 DEBUG : linux7.mak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : linux7.mak: Unchanged skipping
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for checks to finish
2019/12/31 20:55:30 DEBUG : mswin32.mak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : mswin32.mak: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.c: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.c.bak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : mswin32.mak.bak: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : mswin32.mak.bak: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.exe: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.exe: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.obj: Size and modification time the same (differ by 0s, within tolerance 100ns)
2019/12/31 20:55:30 DEBUG : nshwrite.obj: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.c: Unchanged skipping
2019/12/31 20:55:30 DEBUG : nshwrite.c.bak: Unchanged skipping
2019/12/31 20:55:30 INFO : Local file system at //?/N:/notesapi/work/nshtest/nshwrite/backup: Waiting for transfers to finish
2019/12/31 20:55:30 DEBUG : test.txt: MD5 = df50b8532af22128787bf44392fc4c51 OK
2019/12/31 20:55:30 INFO : test.txt: Copied (new)
2019/12/31 20:55:30 ERROR : Attempt 2/3 succeeded
2019/12/31 20:55:30 INFO :
Transferred: 3.503M / 3.503 MBytes, 100%, 140.142 MBytes/s, ETA 0s
Errors: 0
Checks: 14 / 14, 100%
Transferred: 1 / 1, 100%
Elapsed time: 0s
2019/12/31 20:55:30 DEBUG : 3 go routines active
2019/12/31 20:55:30 DEBUG : rclone: Version "v1.50.2" finishing with parameters ["d:\rclone\rclone.exe" "sync" "test" "backup" "--delete-before" "--local-no-check-updated" "-v" "-v"]