Before everything, install python3. Because we use python as our programing language.
sudo apt-get install screen git && curl https://rclone.org/install.sh | sudo bash
After all dependency above are successfully installed, run this command
sudo git clone https://github.com/xyou365/AutoRclone && cd AutoRclone && sudo pip3 install -r requirements.txt
For Windows system: Directly download this project then install latest rclone. Then run this command (type in cmd command windows or PowerShell windows) in our project folder
pip3 install -r requirements.txt
Let us create only the service accounts that we need. Warning: abuse of this feature is not the aim of autorclone and we do NOT recommend that you make a lot of projects, just one project and 100 sa allow you plenty of use, its also possible that overabuse might get your projects banned by google.
Enable the Drive API in Python Quickstart
and save the file
credentials.json into project directory.
If you do not have any project in your account then
Note: 1 service account can copy around 750gb a day, 1 project makes 100 service accounts so thats 75tb a day, for most users this should easily suffice.
The command would look something like
python3 gen_sa_accounts.py --quick-setup 1
replace "1" with the number of projects you want
If you have already N projects and want to create service accounts only in newly created projects,
python3 gen_sa_accounts.py --quick-setup 1 --new-only
If you want to create some service accounts using existing projects (do not create more projects), run
python3 gen_sa_accounts.py --quick-setup -1.
Note that this will overwrite the existing service accounts.
After it is finished, there will be many json files in one folder named
We use Google Groups to manager our service accounts considering the
Official limits to the members of Team Drive (Limit for individuals and groups directly added as members: 600).
Turn on the Directory API following official steps (save the generated json file to folder
python3 add_to_google_group.py -g [email protected]
For meaning of above flags, please run
python3 add_to_google_group.py -h
Create Google Group then add the service accounts as members by hand. Limit is 10 at a time, 100 a day but if you read our warning and notes above, you would have 1 project and hence easily in your range.
If you do not use Team Drive, just skip. Warning: It is NOT recommended to use service accounts to clone "to" folders that are not in teamdrives, SA work best for teamdrives.
If you have already created Google Groups (Step 2) to manager your service accounts, add the group address
[email protected] or
[email protected] to your source Team Drive (tdsrc) and destination Team Drive (tddst).
Otherwise, add service accounts directly into Team Drive.
Enable the Drive API in Python Quickstart and save the
credentials.jsoninto project root path if you have not done it in Step 2.
- Add service accounts into your source Team Drive:
python3 add_to_team_drive.py -d SharedTeamDriveSrcID
- Add service accounts into your destination Team Drive:
python3 add_to_team_drive.py -d SharedTeamDriveDstID
Let us copy hundreds of TB resource using service accounts. Note: Sarcasm, over abuse of this (regardless of what cloning script you use) may get you noticed by google, we recommend you dont be a glutton and clone what is important instead of downloading entire wikipedia.
python3 rclone_sa_magic.py -s SourceID -d DestinationID -dp DestinationPathName -b 1 -e 600
For meaning of above flags, please run python3 rclone_sa_magic.py -h
rclone cannot read all contents of public shared folder.
Please make sure the Rclone can read your source and destination directory. Check it using
rclone --config rclone.conf size --disable ListR src001:
rclone --config rclone.conf size --disable ListR dst001:
python3 rclone_sa_magic.py -sp YourLocalPath -d DestinationID -dp DestinationPathName -b 1 -e 600
tail -f log_rclone.txtto see what happens in details (linux only).
Also let's talk about this project in Telegram Group AutoRclone