这篇文章是一位群友写给他的外国友人的英文版教程,经群友授权发布在本博客,感谢群友 @xiaobairookie 的分享!

Use AutoRclone and Gclone to break the transfer limit of Google Team Drive

Notice: This guide is works under Windows 10.

Thanks to these repository:

Thanks to The Author :

————————————————————————————————————————————

What you need: Python 3.8.2 Rclone AutoRclone

Step 01:

Move all Rclone folder to AutoRclone folder. As below

autorclone.png

Step 02:

Create Service Accounts

Enable the Drive API

enablethedriveapi.png

Choose Desktop App and Create

desktop_app.png

Click on Download Client Configuration and it will be a credentials.json file. Move into AutoRclone folder.

downloadclientconfiguration.png

Step 03:

Create Project.

Type CMD in AutoRclone address bar. As below

cmd.png

Here have three kinds of situation:

  1. Haven't create project before.

    Run this command.

    python3 gen_sa_accounts.py --quick-setup 1

    This CMD meanings: 1.Add one project. 2.Enable the following service. 3.Create 100 Service Accounts. 4.Download the 100 service accounts .json file to the path [accounts] in AutoRclone

  2. Have project before, but want to create new.

    Run this command.

    python3 gen_sa_accounts.py --quick-setup 2 --new-only

    This CMD meanings: 1.Add two project.(Project N+1 to Project N+2) 2.Enable the following service. 3.Create 200 Service Accounts. (Every project will create 100 service accounts.) 4.Download those 200 service accounts .json file to the path [accounts] in AutoRclone

  3. Have project before, not to create new.

    Run this command.

    python3 gen_sa_accounts.py --quick-setup -1

    This CMD meanings: 1.Cover all owned service accounts.

In normal situation is Situation 01. After we ENTER the command, we will get a reply as below

authorizecode.png

Copy the address and Paste in Web Browser.Then, choose the Google Account that you need.

googleaccount.png

Click Allow

allow.png

Copy the which you get code, and paste it into CMD.

code.png

After that if get a reply as below that means you haven't Enable Google Service API.

Copy the link and paste into web browser.

API.png

Click Enable.

APIweb.png

Then, back to CMD press ENTER to retry. Wait patiently… ...

creatingaccount.png

Done.

Now we can see that have a lot of .json file in the folder AutoRcloneaccounts as below.

These .json is our service accounts.

json.png

Step 04:

Add Services Accounts into Google Groups

Have two situation in this step:

  1. You are using a Google Gsuite Account
  2. You just a normal Google Account

If you are Gsuite Account, congratulations you will done this step faster… If you are not Gsuite Account, nevermind we do it step by step

In this step, we need to add hundreds of Service Accounts into Google Groups. Most important is … Everytime we just can add 10 accounts… Every 24 hours, just can add 100 accounts

So as a normal accounts, this is the steps:

Create Google Groups:

Google Group

creategroup.png

Enter your group detail.

groupdetail.png

Copy those hundreds of emails.

Copy one by one it is too slow, so we need to use a Google Extension.

Install this entension.

Google Chrome Extension : Email Extractor

Back to your Google Cloud Console.

googlecloudconsole.png

Click the extension just install.

extension.png

We will see a lot of email, then click on Download as .txt

Important: Your own email have also inside so you need to remove yourself!!!

Add those emails to Google Group
Group have created, Service Accounts have received, now we going to add those hundreds emails to Google Groups
Back to Google Group website, back to your group that created just now…

Click Manange Members.

managemember.png

Click Direct add member! Other will cause you failed!!
Remember just can adding 10 emails once … 100 emails in 24 hours...

directaddmember.png

Click About.

about.png

Find Group email.

groupemail.png

Add this Google Groups Accounts add to your Google Team Drive.

GTD.png

Important!! Must add it as Manager. Otherwise, it will have limit quota per day!!

addnewmembers.png

Finally, we done all basic setup...

Step 05:

Directly use...

First, we need to add Service Accounts to the following Team Drive.

python3 add_to_team_drive.py -d SharedTeamDriveDstID

What is my Team Drive ID?!
Open your team drive it website will be:
https://drive.google.com/drive/u/0/folders/0AH3HJKhn6fdsNUk9PVA
0AH3HJKhn6fdsNUk9PVA ---->This is your Team Drive ID

So you should run the command as below:

python3 add_to_team_drive.py -d 0AH3HJKhn6fdsNUk9PVA

Then press ENTER.

enter.png

Now we can use it.
For more information about command please visit this website...
AutoRclone-Start_Your_Task

OR

Step 05:

Use with Gclone

Config Gclone
First we need to choose one of the .json file in AutoRcloneaccountsxxx.json also include the path.

Example: C:UsersUserDesktopAutoRcloneaccounts0a8bec29acc019399b591c88cd6dbfa4a6da65e4.json

Gclone config is same as Rclone config.
Enter the command gclone config

Then enter "n''

new.png

Then enter "NAME"

name.png

Enter "13" (Google Drive)

Client_ID> (Make it empty just press ENTER)
Client_secret>(Make it empty just press ENTER)

Enter "1"

1.png

root_folder_id>(Make it empty just press ENTER)

Enter the Path which just we choose.

Service_account_file>C:UsersUserDesktopAutoRcloneaccounts0a8bec29acc019399dbfa4a6da65e4.json

Service_account_file_path> C:UsersUserDesktopAutoRcloneaccount

path.png

Advanced Config>n
Configure it as team drive>y

Last ALL Done.

How to use Gclone to copy folder ??
Author Github Repository

Enter the command

gclone copy yourconfigname:{folderid} yourconfigname:{folderid} --drive-server-side-across-configs -v

Example this is the Shared Folder
https://drive.google.com/open?id=1MUemxroNqeGXH4St5yplQDpzlCJ0lYDT

This is your folderid ----> 1MUemxroNqeGXH4St5yplQDpzlCJ0lYDT

[CMD] --drive-server-side-across-configs : Run copy at server side it will not waste your network usage.
[CMD] -v :Check the details. -vv :More details.

Last modification:April 8th, 2020 at 08:45 pm
如果觉得我的文章对你有用,请随意赞赏