rclone: Google Drive - Server Side Copy Duplicates Folder with --drive-shared-with-me
What is the problem you are having with rclone?
If you run a server side copy twice, you get two of the same folders and it repeats.
What is your rclone version (output from rclone version)
rclone v1.47.0
- os/arch: linux/amd64
- go version: go1.12.4
Which OS you are using and how many bits (eg Windows 7, 64 bit)
ArchLinux
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone copy --drive-shared-with-me GD:Test GD:Countries/Test -vv
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
rclone copy --drive-shared-with-me GD:Test GD:Countries/Test -vv
2019/04/24 18:59:10 DEBUG : rclone: Version "v1.47.0" starting with parameters ["rclone" "copy" "--drive-shared-with-me" "GD:Test" "GD:Countries/Test" "-vv"]
2019/04/24 18:59:10 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2019/04/24 18:59:11 INFO : Google drive root 'Countries/Test': Waiting for checks to finish
2019/04/24 18:59:11 INFO : Google drive root 'Countries/Test': Waiting for transfers to finish
2019/04/24 18:59:17 INFO : (Public) U22.17.0.1 - Mastery Checklist by /u/Sekwah.xlsx: Copied (server side copy)
2019/04/24 18:59:17 INFO : TestSheet.xlsx: Copied (server side copy)
2019/04/24 18:59:17 INFO : Test2.xlsx: Copied (server side copy)
2019/04/24 18:59:17 INFO :
Transferred: off / off, -, 0 Bytes/s, ETA -
Errors: 0
Checks: 0 / 0, -
Transferred: 3 / 3, 100%
Elapsed time: 7.7s
2019/04/24 18:59:17 DEBUG : 8 go routines active
2019/04/24 18:59:17 DEBUG : rclone: Version "v1.47.0" finishing with parameters ["rclone" "copy" "--drive-shared-with-me" "GD:Test" "GD:Countries/Test" "-vv"]
[felix@gemini scripts]$ rclone copy --drive-shared-with-me GD:Test GD:Countries/Test -vv
2019/04/24 18:59:23 DEBUG : rclone: Version "v1.47.0" starting with parameters ["rclone" "copy" "--drive-shared-with-me" "GD:Test" "GD:Countries/Test" "-vv"]
2019/04/24 18:59:23 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2019/04/24 18:59:24 INFO : Google drive root 'Countries/Test': Waiting for checks to finish
2019/04/24 18:59:24 INFO : Google drive root 'Countries/Test': Waiting for transfers to finish
2019/04/24 18:59:28 INFO : Test2.xlsx: Copied (server side copy)
2019/04/24 18:59:29 INFO : (Public) U22.17.0.1 - Mastery Checklist by /u/Sekwah.xlsx: Copied (server side copy)
2019/04/24 18:59:29 INFO : TestSheet.xlsx: Copied (server side copy)
2019/04/24 18:59:29 INFO :
Transferred: off / off, -, 0 Bytes/s, ETA -
Errors: 0
Checks: 0 / 0, -
Transferred: 3 / 3, 100%
Elapsed time: 6.3s
2019/04/24 18:59:29 DEBUG : 8 go routines active
2019/04/24 18:59:29 DEBUG : rclone: Version "v1.47.0" finishing with parameters ["rclone" "copy" "--drive-shared-with-me" "GD:Test" "GD:Countries/Test" "-vv"]

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (8 by maintainers)
This problem is now fixed with the new connection string syntax added to v1.55
This means is is possible to add the
shared_with_meto just the source on the command line.I will hence close this issue!
Ran into the same problem today. Initially I wanted to use
--drive-root-folder-idinstead of--drive-shared-with-mebut that threw a bunch of errors. Presumably also because it applies to both, dest and source.Modifying the syntax would be my preferred solution, since that would be a fix for both flags.
Thank you for that workaround, ncw. It will solve my immediate problem for now. I shall test as soon as the dedupe finishes.
Edit: Sure enough, adding
root_folder_idto the config file section of the source remote works.The reason this creates a duplicate is
--drive-shared-with-meflag applies to both the source and the destination google drive--drive-shared-with-mein the dest so it creates anotherThis suggests a work-around, create another remote with the
shared_with_me = truein it. then dorclone copy drivesharedwithme: drive:. I’ve tested that and it works.Another solution would be to allow all files to be visible in
--drive-shared-with-menot just the shared files. That would work but would be quite a big change.A final idea I has was to modify the remote syntax so you could do this which would set the
--drive-shared-with-meflag a bit more precisely.