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