Repository navigation
Closed
Milestone
Description
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
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
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
Activity
ncw commentedon Sep 15, 2020
I managed to replicate this
@Cnly have you got time to have a look at this?
Cnly commentedon Sep 15, 2020
I also just reproduced this, but got different-looking logs which says
file1.txt: Failed to copy: nameAlreadyExists: Name already exists, so I tend to think this is an upstream bug.BeansIsFat commentedon Sep 15, 2020
I think the difference is due to OneDrive Personal vs OneDrive Business. I get the same result as @ncw when using OneDrive Personal and the same result as @Cnly when using OneDrive Business. The original bug report was using OneDrive Business.
Cnly commentedon Sep 15, 2020
@BeansIsFat Good observation! Thanks. After some more looking around, I suspect this is a case of the upstream bug OneDrive/onedrive-api-docs#981.
Cnly commentedon Sep 18, 2020
In the meanwhile, a workaround may be to delete the destination file first and then run the copy.
BeansIsFat commentedon Sep 18, 2020
I've tried that and it does work. Creates a bit of extra effort but I can minimize that by using
rclone check --one-way --differ ~/delete-these.txtto make a list of destination files to delete.The bug seems to be specific to server-side copies so another workaround, if the files are small enough, is to bypass server-side copying with
rclone copy --disable copy.Cnly commentedon Jan 5, 2021
According to the comment OneDrive/onedrive-api-docs#981 (comment), I've added a workaround (existing files will now be replaced), but it works for OneDrive for Business only.
bisync: add to integration tests - fixes rclone#7665