Copy fails on OneDrive when source changes

What is the problem you are having with rclone?

On a OneDrive remote, if a file in the source directory was previously copied to the destination, any changes to the source file cause the copy command to fail. If the file is not already in the remote, the copy command succeeds.

What is your rclone version (output from rclone version)

rclone v1.53.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

MacOS 10.14.6

Which cloud storage system are you using? (eg Google Drive)

OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync -vv --timeout=1m --retries 1 onedrive:foo onedrive:bar

The rclone config contents with secrets removed.

[onedrive]
type = onedrive
token = {"access_token":"redacted","token_type":"Bearer","refresh_token":"redacted","expiry":"2020-09-13T21:24:20.62671-04:00"}
drive_id = redacted
drive_type = business

A log from the command with the -vv flag

2020/09/13 20:41:05 DEBUG : rclone: Version "v1.53.0" starting with parameters ["rclone" "copy" "-vv" "--timeout=1m" "--retries" "1" "onedrive:foo" "onedrive:bar"]
2020/09/13 20:41:05 DEBUG : Using config file from "/Users/redacted/.config/rclone/rclone.conf"
2020/09/13 20:41:05 DEBUG : Creating backend with remote "onedrive:foo"
2020/09/13 20:41:06 DEBUG : Creating backend with remote "onedrive:bar"
2020/09/13 20:41:06 DEBUG : One drive root 'bar': Waiting for checks to finish
2020/09/13 20:41:06 DEBUG : foo.txt: Modification times differ by -1m10s: 2020-09-14 00:33:04 +0000 UTC, 2020-09-14 00:31:54 +0000 UTC
2020/09/13 20:41:06 DEBUG : foo.txt: QuickXorHash = 5428c31ce8000219000000000600000000000000 (One drive root 'foo')
2020/09/13 20:41:06 DEBUG : foo.txt: QuickXorHash = 5428c31ce8008218000000000600000000000000 (One drive root 'bar')
2020/09/13 20:41:06 DEBUG : foo.txt: QuickXorHash differ
2020/09/13 20:41:06 DEBUG : One drive root 'bar': Waiting for transfers to finish
2020/09/13 20:42:06 INFO  :
Transferred:   	         0 / 6 Bytes, 0%, 0 Bytes/s, ETA -
Checks:                 1 / 1, 100%
Transferred:            0 / 1, 0%
Elapsed time:       1m1.2s
Transferring:
 *                                       foo.txt:  0% /6, 0/s, -

2020/09/13 20:42:08 ERROR : foo.txt: Failed to copy: async operation didn't complete after 1m0s
2020/09/13 20:42:08 INFO  : There was nothing to transfer
2020/09/13 20:42:08 ERROR : Attempt 1/1 failed with 1 errors and: async operation didn't complete after 1m0s
2020/09/13 20:42:08 INFO  :
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 1 / 1, 100%
Elapsed time:       1m3.6s

2020/09/13 20:42:08 DEBUG : 7 go routines active
2020/09/13 20:42:08 Failed to copy: async operation didn't complete after 1m0s

hello,

not sure what the exact problem is.

but you can use this flag for server-side-copy
https://rclone.org/onedrive/#onedrive-server-side-across-configs

This is on the same remote. Server-side copy works fine if the file doesn’t already exist in the destination.

right,
still on my first coffee of the day....

I managed to replicate this

$ echo hello | rclone rcat onedrive:test/file1.txt
$ rclone -vv copyto onedrive:test/file1.txt onedrive:test/file2.txt
2020/09/14 16:22:13 DEBUG : rclone: Version "v1.53.1-DEV" starting with parameters ["rclone" "-vv" "copyto" "onedrive:test/file1.txt" "onedrive:test/file2.txt"]
2020/09/14 16:22:13 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2020/09/14 16:22:13 DEBUG : Creating backend with remote "onedrive:test/file1.txt"
2020/09/14 16:22:16 DEBUG : fs cache: adding new entry for parent of "onedrive:test/file1.txt", "onedrive:test"
2020/09/14 16:22:16 DEBUG : Creating backend with remote "onedrive:test/"
2020/09/14 16:22:16 DEBUG : fs cache: renaming cache item "onedrive:test/" to be canonical "onedrive:test"
2020/09/14 16:22:17 DEBUG : file1.txt: Need to transfer - File not found at Destination
2020/09/14 16:22:19 DEBUG : file1.txt: SHA-1 = f572d396fae9206628714fb2ce00f72e94f2258f OK
2020/09/14 16:22:19 INFO  : file1.txt: Copied (server side copy)
2020/09/14 16:22:19 INFO  : 
Transferred:   	         6 / 6 Bytes, 100%, 3 Bytes/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         5.7s

2020/09/14 16:22:19 DEBUG : 7 go routines active
$ echo hellohello | rclone rcat onedrive:test/file1.txt
$ rclone -vv copyto onedrive:test/file1.txt onedrive:test/file2.txt
2020/09/14 16:22:30 DEBUG : rclone: Version "v1.53.1-DEV" starting with parameters ["rclone" "-vv" "copyto" "onedrive:test/file1.txt" "onedrive:test/file2.txt"]
2020/09/14 16:22:30 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2020/09/14 16:22:30 DEBUG : Creating backend with remote "onedrive:test/file1.txt"
2020/09/14 16:22:31 DEBUG : fs cache: adding new entry for parent of "onedrive:test/file1.txt", "onedrive:test"
2020/09/14 16:22:31 DEBUG : Creating backend with remote "onedrive:test/"
2020/09/14 16:22:32 DEBUG : fs cache: renaming cache item "onedrive:test/" to be canonical "onedrive:test"
2020/09/14 16:22:33 DEBUG : file1.txt: Sizes differ (src 11 vs dst 6)
2020/09/14 16:22:37 ERROR : file2.txt: corrupted on transfer: sizes differ 11 vs 6
2020/09/14 16:22:37 INFO  : file2.txt: Removing failed copy
2020/09/14 16:22:38 ERROR : Attempt 1/3 failed with 1 errors and: corrupted on transfer: sizes differ 11 vs 6
2020/09/14 16:22:38 DEBUG : file1.txt: Need to transfer - File not found at Destination
2020/09/14 16:22:40 DEBUG : file1.txt: SHA-1 = 60e4cc679a5c273df21513400ccc98dcf88f3df1 OK
2020/09/14 16:22:40 INFO  : file1.txt: Copied (server side copy)
2020/09/14 16:22:40 ERROR : Attempt 2/3 succeeded
2020/09/14 16:22:40 INFO  : 
Transferred:   	        17 / 17 Bytes, 100%, 2 Bytes/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:        10.3s

2020/09/14 16:22:40 DEBUG : 7 go routines active
$ 

Can you please make a new issue on github about that please with a link to the forum post - thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.