How to copy folder from shared_with_me to shared_drive

What is the problem you are having with rclone?

I got trouble to copy folder from "shared with me" to "shared drive".

Run the command 'rclone version' and share the full output of the command.

rclone v1.51.0

  • os/arch: linux/amd64
  • go version: go1.13.7

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 lsd --drive-shared-with-me teamdrive:

The rclone config contents with secrets removed.

--------------------
[teamdrive]
type = drive
client_id = REDACTED
client_secret = REDACTED
scope = drive
service_account_file = REDACTED
service_account_file_path = REDACTED
team_drive = REDACTED
--------------------

A log from the command with the -vv flag

2023/04/11 00:11:09 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "ls" "--drive-shared-with-me" "teamdrive:" "-vv"]
2023/04/11 00:11:09 DEBUG : Using config file from "/home/ppp/.config/rclone/rclone.conf"
2023/04/11 00:11:09 DEBUG : Google drive root '': read info from team drive "AllinOne"
2023/04/11 00:11:09 DEBUG : 7 go routines active
2023/04/11 00:11:09 DEBUG : rclone: Version "v1.51.0" finishing with parameters ["rclone" "ls" "--drive-shared-with-me" "teamdrive:" "-vv"]

Additional Notes:


Basically I want to copy folders from the red circle(shared with me) to the green circle(shared drive). This is my created google suite account. The config is success and it's a team drive. But when run the command

rclone lsd --drive-shared-with-me teamdrive:

It always report nothing. I think rclone doesn't find the folder in "shared with me".

teamdrive is configured to linking with the top directory of AllinOne shared drive. It did show all folders correctly with this command:

rclone lsd teamdrive:

I wonder if this isn't working because you are using a teamdrive as the root.

Try

rclone lsd --drive-shared-with-me --drive-team-drive="" teamdrive:

Assuming that works, then copy it like this

rclone copy -v teamdrive,shared_with_me,team_drive=:Folder teamdrive:path/to/Folder

Thank you for answering. Unfortunately, this command still return nothing.

rclone lsd --drive-shared-with-me --drive-team-drive="" teamdrive:

It return empty as well.

A log from the command with the -vv flag

rclone lsd --drive-shared-with-me --drive-team-drive="" teamdrive: -vv
2023/04/11 10:00:14 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "lsd" "--drive-shared-with-me" "--drive-team-drive=" "teamdrive:" "-vv"]
2023/04/11 10:00:14 DEBUG : Using config file from "/home/ppp/.config/rclone/rclone.conf"
2023/04/11 10:00:14 DEBUG : 7 go routines active
2023/04/11 10:00:14 DEBUG : rclone: Version "v1.51.0" finishing with parameters ["rclone" "lsd" "--drive-shared-with-me" "--drive-team-drive=" "teamdrive:" "-vv"]

Update rclone as you have a very old version.

Thanks for suggestion. I've updated my rclone to latest version 1.62.2
The log file changes a little bit. But it still shows nothing.

rclone lsd --drive-shared-with-me teamdrive: -vv
2023/04/11 10:27:06 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "--drive-shared-with-me" "teamdrive:" "-vv"]
2023/04/11 10:27:06 DEBUG : Creating backend with remote "teamdrive:"
2023/04/11 10:27:06 DEBUG : Using config file from "/home/ppp/.config/rclone/rclone.conf"
2023/04/11 10:27:06 DEBUG : teamdrive: detected overridden config - adding "{ysOIc}" suffix to name
2023/04/11 10:27:06 DEBUG : fs cache: renaming cache item "teamdrive:" to be canonical "teamdrive{ysOIc}:"
2023/04/11 10:27:07 DEBUG : Google drive root '': read info from Shared Drive "AllinOne"
2023/04/11 10:27:07 DEBUG : 6 go routines active

rclone lsd --drive-shared-with-me --drive-team-drive="" teamdrive: -vv
2023/04/11 10:24:15 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "--drive-shared-with-me" "--drive-team-drive=" "teamdrive:" "-vv"]
2023/04/11 10:24:15 DEBUG : Creating backend with remote "teamdrive:"
2023/04/11 10:24:15 DEBUG : Using config file from "/home/ppp/.config/rclone/rclone.conf"
2023/04/11 10:24:15 DEBUG : teamdrive: detected overridden config - adding "{KK5E_}" suffix to name
2023/04/11 10:24:15 DEBUG : fs cache: renaming cache item "teamdrive:" to be canonical "teamdrive{KK5E_}:"
2023/04/11 10:24:15 DEBUG : 6 go routines active

This should work! Note rclone lsd only lists directories so you might want rclone lsf to show everything.

If that doesn't work then are you sure you are using the same Google user in the web interface that you are using in rclone? Stuff is shared with a user so if they aren't the same you won't see it.

Thanks for answering. I did try rclone lsf but it report nothing as well.
Basically I have two google accounts. A is edu account. B is a G suite account. Teamdrive is configured to link to B with API. Now I shared folders in account A to account B.
Do you think any above steps are wrong?

That sounds correct and when I try something similar it works fine.

Can you double check you can see the teamdrive: contents properly? Can you upload a file to there with rclone and see it in the web interface?

Thank you so much for answering. After tons of searching and testing, I believe I find the reason. I'm using Service Account instead of token. And the service account looks like not have access to the shared files. All shared files are only available to one google account, the google suite account. So I can successfully use rclone copy to copy from "shared with me" to "shared drove" after resetting the configuration to token.

Now it comes to another question, how to bypass the 750GB limit? I believe using service account is related to the solution in my memory. I think I use gclone to bypass the limit on 2020, but that one is pretty out of date.
Additionally may I know the mechanism of rclone copy? Does it mean download the content from source and upload it to the destination? If so, the bottom looks like the uploading bandwidth.

You don't bypass it.

I remember it's feasible on 2020. Basically bypass the 750GB limit by switch service accounts. Is it still available now or Google disabled this solution.

We don't condone, recommend or endorse any method to bypass Google's limits.

Closing the topic.

1 Like