Onedrive, move to shared folder fails

What is the problem you are having with rclone?

I'm trying to move a file between my personal Onedrive folder and a Shared Folder to which I have edit permissions, the operation fails.

This is my understanding: Rclone attempts to perform a server-side move, but the onedrive package uses the Microsoft Graph API, and it does not provide a way to move files between drives, so an exception is raised and catched, it then tries to copy but I don't understand the logic there. See the link below:
rclone/onedrive.go at master · rclone/rclone · GitHub, lines 1331-1335.

But I was under the impression that when server-side operations failed (move, copy), rclone would automatically attempt to perform the operation locally.

My question is two-fold:
1- Is this feature missing from rclone (waiting implementation) or a limitation of the API to third-parties?
2- What is the recommended procedure to move the files?

What is your rclone version (output from rclone version)

rclone v1.55.1

  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.4
  • go/linking: dynamic
  • go/tags: none

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

Manjaro Linux, 64 bit

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 move onedrive:Dia19.mp4 "onedrive:clima carioca" -vv

The rclone config contents with secrets removed.

[onedrive]
type = onedrive
token = {"access_token":"XXXX","token_type":"Bearer","refresh_token":"XXXX","expiry":"XXXX"}
drive_id = XXXX
drive_type = personal

[gdriveuff]
type = drive
scope = drive
token = {"access_token":"XXXX","token_type":"Bearer","refresh_token":"XXXX","expiry":"XXXX"}
root_folder_id = XXXX
client_id = XXXX
client_secret = XXXX

[gdrivepessoal]
type = drive
scope = drive
token = {"access_token":"XXXX","token_type":"Bearer","refresh_token":"XXXX","expiry":"XXXX"}

[filmesseries_crypt]
type = crypt
remote = gdriveuff:filmesseries_crypt
filename_encryption = standard
directory_name_encryption = true
password = XXXX

A log from the command with the -vv flag

2021/06/14 00:30:01 DEBUG : Using config file from "/home/gustavo/.config/rclone/rclone.conf"
2021/06/14 00:30:01 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "move" "onedrive:Dia19.mp4" "onedrive:clima carioca" "-vv"]
2021/06/14 00:30:01 DEBUG : Creating backend with remote "onedrive:Dia19.mp4"
2021/06/14 00:30:12 DEBUG : fs cache: adding new entry for parent of "onedrive:Dia19.mp4", "onedrive:"
2021/06/14 00:30:12 DEBUG : Creating backend with remote "onedrive:clima carioca"
2021/06/14 00:30:18 DEBUG : Dia19.mp4: Need to transfer - File not found at Destination
2021/06/14 00:30:18 DEBUG : One drive root 'clima carioca': Can't move files between drives ("650db1791acd40d1" != "78923dff818916d7")
2021/06/14 00:30:18 DEBUG : Dia19.mp4: Can't move, switching to copy
2021/06/14 00:30:25 ERROR : Dia19.mp4: Failed to copy: Dia19.mp4: async operation returned "failed"
2021/06/14 00:30:25 ERROR : Dia19.mp4: Not deleting source as copy failed: Dia19.mp4: async operation returned "failed"
2021/06/14 00:30:25 ERROR : Attempt 1/3 failed with 1 errors and: Dia19.mp4: async operation returned "failed"
2021/06/14 00:30:30 DEBUG : Dia19.mp4: Need to transfer - File not found at Destination
2021/06/14 00:30:30 DEBUG : One drive root 'clima carioca': Can't move files between drives ("650db1791acd40d1" != "78923dff818916d7")
2021/06/14 00:30:30 DEBUG : Dia19.mp4: Can't move, switching to copy
2021/06/14 00:30:32 ERROR : Dia19.mp4: Failed to copy: Dia19.mp4: async operation returned "failed"
2021/06/14 00:30:32 ERROR : Dia19.mp4: Not deleting source as copy failed: Dia19.mp4: async operation returned "failed"
2021/06/14 00:30:32 ERROR : Attempt 2/3 failed with 1 errors and: Dia19.mp4: async operation returned "failed"
2021/06/14 00:30:42 ERROR : Attempt 3/3 failed with 1 errors and: Get "https://graph.microsoft.com/v1.0/drives/650db1791acd40d1/items/650DB1791ACD40D1!200917:/Dia19.mp4:": dial tcp: lookup graph.microsoft.com: no such host
2021/06/14 00:30:42 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 2 / 2, 100%
Elapsed time:        41.8s

2021/06/14 00:30:42 DEBUG : 5 go routines active
2021/06/14 00:30:42 Failed to move: Get "https://graph.microsoft.com/v1.0/drives/650db1791acd40d1/items/650DB1791ACD40D1!200917:/Dia19.mp4:": dial tcp: lookup graph.microsoft.com: no such host

hi,
dial tcp: lookup graph.microsoft.com: no such host

not sure what is going on.
it could be a networking problem or something to do with DNS resolution.

also, i would try --onedrive-server-side-across-configs=true

Hello,

First a test report to isolate the issue:
I've tried moving the files yesterday, using the official Onedrive client for Windows 10 and using Onedrive web: None works, even after I grant the ownership switch that is necessary. So there is high chance this issue is not related to rclone at all, but to my account... If you agree to that accessment my question changes, how would I upload locally, is there a flag for that in the move operation?

Here is the result of your request:

Command: rclone move onedrive:Dia19.mp4 "onedrive:clima carioca" -vv --onedrive-server-side-across-configs=true

Log:

2021/06/14 10:53:38 DEBUG : Using config file from "/home/gustavo/.config/rclone/rclone.conf"
2021/06/14 10:53:38 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "move" "onedrive:Dia19.mp4" "onedrive:clima carioca" "-vv" "--onedrive-server-side-across-configs=true"]
2021/06/14 10:53:38 DEBUG : Creating backend with remote "onedrive:Dia19.mp4"
2021/06/14 10:53:38 DEBUG : onedrive: detected overridden config - adding "{Db/Y9}" suffix to name
2021/06/14 10:53:49 DEBUG : fs cache: adding new entry for parent of "onedrive:Dia19.mp4", "onedrive{Db/Y9}:"
2021/06/14 10:53:49 DEBUG : Creating backend with remote "onedrive:clima carioca"
2021/06/14 10:53:49 DEBUG : onedrive: detected overridden config - adding "{Db/Y9}" suffix to name
2021/06/14 10:53:49 DEBUG : fs cache: renaming cache item "onedrive:clima carioca" to be canonical "onedrive{Db/Y9}:clima carioca"
2021/06/14 10:54:00 DEBUG : Dia19.mp4: Need to transfer - File not found at Destination
2021/06/14 10:54:00 DEBUG : One drive root 'clima carioca': Can't move files between drives ("650db1791acd40d1" != "78923dff818916d7")
2021/06/14 10:54:00 DEBUG : Dia19.mp4: Can't move, switching to copy
2021/06/14 10:54:02 ERROR : Dia19.mp4: Failed to copy: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:02 ERROR : Dia19.mp4: Not deleting source as copy failed: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:02 ERROR : Attempt 1/3 failed with 1 errors and: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:03 DEBUG : Dia19.mp4: Need to transfer - File not found at Destination
2021/06/14 10:54:03 DEBUG : One drive root 'clima carioca': Can't move files between drives ("650db1791acd40d1" != "78923dff818916d7")
2021/06/14 10:54:03 DEBUG : Dia19.mp4: Can't move, switching to copy
2021/06/14 10:54:05 ERROR : Dia19.mp4: Failed to copy: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:05 ERROR : Dia19.mp4: Not deleting source as copy failed: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:05 ERROR : Attempt 2/3 failed with 1 errors and: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:05 DEBUG : Dia19.mp4: Need to transfer - File not found at Destination
2021/06/14 10:54:05 DEBUG : One drive root 'clima carioca': Can't move files between drives ("650db1791acd40d1" != "78923dff818916d7")
2021/06/14 10:54:05 DEBUG : Dia19.mp4: Can't move, switching to copy
2021/06/14 10:54:09 ERROR : Dia19.mp4: Failed to copy: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:09 ERROR : Dia19.mp4: Not deleting source as copy failed: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:09 ERROR : Attempt 3/3 failed with 1 errors and: Dia19.mp4: async operation returned "failed"
2021/06/14 10:54:09 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 3 / 3, 100%
Elapsed time:        30.7s

2021/06/14 10:54:09 DEBUG : 5 go routines active
2021/06/14 10:54:09 Failed to move: Dia19.mp4: async operation returned "failed"

oh, if that does not work onedrive client and onedrive website then it would not be a rclone issue.

can you state the question?

Yes, does rclone provide a flag to perform "local move" operation in the same remote (Onedrive in this case)? It should be the same behavior as if I was moving between remotes [download each file, upload them].

in that case, onedrive will do a server-side-move.
rclone will not download and then upload using your internet connection.

rclone move onedrivevbility:movetest/source/file.txt onedrivevbility:movetest/dest -v 
2021/06/14 11:51:11 INFO  : file.txt: Moved (server-side)

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