A simple python script for rclone. Use multiple Google Service Accounts and cycle through them.

Overview

About GSAclone

GSAclone is a simple python script for rclone, written with the purpose of using multiple Google service accounts on Google Drive and "randomize" them. Though they are not really randomized, at least they are cycled through, and you won't have to manually specify which service account you use on each command.

The other solution such as AutoRclone and gclone doesn't work on me, when I tried it a few months ago.
So I decided to write my own rclone script and voila, this is it. The script is far from perfect, but at least it gets the job done for my use case.

How to use (Windows only)

1). Setting up the environment:
Your service accounts should be first renamed into "service_account_X.json" where X is the number from 0 to (let's say) 100.

Here's how I set up mine:

rclone is in "D:/Utility/rclone"
Service accounts are stored in the same folder as rclone, inside the service_account folder: "D:/Utility/rclone/service_accounts"
Inside the folder, I have a hunder of service accounts named from "service_account_0.json" to "service_account_100.json"

To perform a sync from GDrive 1 to GDrive 2, I run: "python GSAclone -m sync -s GDrive_Shiro39: -d GDrive_Backup:

2). You must have python already installed on your system first.
As I'm using Windows and I wrote this script on Windows, the example usage below is for Windows.

Open the script in either CMD (Command Prompt) or Windows Terminal

python GSAclone.py -h

usage: GSAclone.py [-h] -m MODE -s SOURCE -d DESTINATION

rclone but with multiple Google Service Accounts.

optional arguments:
  -h, --help            show this help message and exit
  -m MODE, --mode MODE                        copy or sync
  -s SOURCE, --source SOURCE                  Example: --source remote_1:
  -d DESTINATION, --destination DESTINATION   Example: --destination remote_2:

To copy/sync GDrive 1 to GDrive 2:

python GSAclone.py --mode copy/sync --source remote_name_src: --destination remote_name_dest:

Configurations

Below are the configurations that you can modify to your needs.

var_loop = 3                              # Tells the script how many times it should be looping for.
var_sleep = 60                            # Tells the script how long it should delay the next routine.

rclone_path = "D:/path/to/rclone"        # Path to where you store rclone. You do NOT need to type in "/rclone.exe"!
rclone_sa_path = "default"                # Set this to "default" to use the same path as your rclone path, or set your own path.


rclone_dry_run = "disabled"               # Tells rclone to run in simulated mode (--dry-run). (Default is "disabled")
rclone_verbose = "disabled"               # Print useful information onto the console (or a log file). (Default is "disabled")
rclone_verbose_level = "default"          # Set the verbose level ("default" or "super"). (Default is "default")

rclone_log_path = "default"             # Set this to "default" to use the same path as your rclone path, or set your own path.
rclone_log_mode = "default"             # Set this to "default" or "json" if you want the log to be in json format.

rclone_log_level = "debug"              # Set the debugging level. (Default is "debug". This is NOT the default from rclone! but rather, from this script.)
                                        # Debugging levels:
                                        # DEBUG is equivalent to -vv. It outputs lots of debug info - useful for bug reports and really finding out what rclone is doing.
                                        # INFO is equivalent to -v. It outputs information about each transfer and prints stats once a minute by default.
                                        # NOTICE is the default log level if no logging flags are supplied. It outputs very little when things are working normally. It outputs warnings and significant events.
                                        # ERROR is equivalent to -q. It only outputs error messages.

rclone_logging = "disabled"               # Set to "enabled" if you wish rclone to output its logs into a file. (Default is "disabled")
                                          # If verbose is enabled, logging will be disabled. You cannot have verbose and logging at the same time.
                                          # Since this script is going to loop for a certain amount of time (based on "var_loop") you could end up with a huge log file size!

rclone_check_first = "enabled"            # Tells rclone to perform check first before transfer. (Default is "enabled")
rclone_fast_list = "enabled"              # Enable --fast-list, useful to reduce the API call but uses more memory. (Default is "enabled")
rclone_modtime = "update"               # Tells rclone to update the modified time of a file. (Set to "update" or "noupdate". Default is "update")

rclone_compare = "default"                # rclone compare mode:
                                          # default            : rclone will look at modification time and size.
                                          # checksum           : rclone will look at checksum and size.
                                          # only-mod-time      : rclone will look at checksum and modification time.
                                          # only-size          : rclone will look at file size only.
                                          # only-checksum      : rclone will look at checksum only.

If rclone_sa_path = "default" you have to store your service accounts inside a folder name "service_account" in your rclone folder.

You could modify the rclone_args = "", but for the sake of keeping the script from having any issue (that I may not be able to help you), I recommend you not to add more rclone flags. If you know exactly what you are doing and you know how to read the flow of the script, feel free to modify it, of course!

Disclaimer

This script is NOT flawless and in fact, far from perfect! The current biggest issue is that it cannot accept any input containing spaces.
For example: rclone_path = "path/to wherever/your/rclone/is" or "remote1:/hellow world/test"

As long as you are backing up from the root folder, it should work just fine.

License

This script is provided "AS IS" and is licensed under the MIT License.

Owner
Shiro39
Hello there! I'm not a programmer / coder, I'm just a hobbyist. Please refrain from asking me to do this or that, as chances are I may not be able to do it.
Shiro39
Discord Online Account Forever

💠 Discord-Online-Account-Forever Discord Online Account Forever 📸 Tutorial Token Discord NEVER SHARE YOUR TOKEN Installation Replit 🧿 Replit : Here

nimaisox 2 Nov 28, 2021
A simple telegram bot to forward files from one channel to other.

Forward_2.0 Bot to forward messages from one channel to other without admin permission in source channel. Can be used for both private and Public chan

SUBIN 56 Dec 29, 2022
Open Resource Calculator Module for Python

Calculator Module for Python By White Night Install #

White_Night_awa 4 Aug 22, 2022
The most expensive version of Conway's Game of Life - running on the Ethereum Blockchain

GameOfLife The most expensive implementation of Conway's Game of Life ever - over $2,000 per step! (Probably the slowest too!) Conway's Game of Life r

75 Nov 26, 2022
A BOT TO FIND ID OF A STICKER.

sticker id A BOT TO FIND ID OF A STICKER. THIS REPOSITORY HAVE TWO BRANCHES FOR DEPLOY WITH COMMAND & WITHOUT COMMAND. Mandatory variables API_ID - Ge

Ashik Muhammed 3 Dec 29, 2022
Scripts to help you win the Pizza Express

Slice of the Prizes Slice of the Prizes is a Python Script designed to enter the "Slice of the Action" competition hosted by Pizza Express the competi

Luke Bendall 1 Nov 04, 2021
Amanda-A next gen powerful telegram group manager bot for manage your groups and have fun with other cool modules.

Amanda-A next gen powerful telegram group manager bot for manage your groups and have fun with other cool modules.

Team Amanda 4 Oct 21, 2022
Throttle and debounce add-on for Pyrogram

pyrothrottle Throttle and debounce add-on for Pyrogram Quickstart implementation on decorators from pyrogram import Client, filters from pyrogram.type

7 Oct 01, 2022
Translator based on Google API

Yakusu Toshiko Translator based on Google API. Instance of this bot is running as @yakusubot. Features Add a plus to a language's name to show an orig

Arisu W. 2 Sep 21, 2022
Salmanul Farisx Bot With Python

Salman_Farisx_Bot How To Deploy Video Subscribe YouTube Channel Added Features Imdb posters for autofilter. Imdb rating for autofilter. Custom caption

1 Dec 23, 2021
A program that generates discord.py code

discord-py-generator A program that generates discord.py code Setup in cmds.txt file add your user id, client id and bot token you can change the bot

3 Dec 15, 2022
GG Dorking is a tool to generate GitHub and Google dorking for pentesters and bug bounty hunters.

GG-Dorking GG Dorking is a python tool to generate GitHub and Google dorking links for pentesters and bug bounty hunters. It will help you to find imp

Eslam Akl 80 Nov 24, 2022
SystemSix is an e-Ink "desk accessory" running on a Raspberry Pi. It is a bit of nostalgia that can function as a calendar, display the weather

SystemSix is an e-Ink "desk accessory" running on a Raspberry Pi. It is a bit of nostalgia that can function as a calendar, display the weather, the c

John Calhoun 372 Jan 02, 2023
Yes, it's true :orange_heart: This repository has 346 stars.

Yes, it's true! Inspired by a similar repository from @RealPeha, but implemented using a webhook on AWS Lambda and API Gateway, so it's serverless! If

512 Jan 01, 2023
WhatsApp Status Tracker With Python

Warning!! This Repo is Purly educational purpose Don't use this to stalk on others, which is subjective to crime Pre-Req: Telegram bot of your own wit

Vignesh Karunagaran 10 Dec 09, 2022
discord bot made in discord.py

udeline discord bot made in discord.py, which's main features include: general use server moderation fun commands other cool commands dependencies dis

1 Feb 08, 2022
CRUD database for python discord bot developers that stores data on discord text channels

Discord Database A CRUD (Create Read Update Delete) database for python Discord bot developers. All data is stored in key-value pairs directly on disc

Ankush Singh 7 Oct 22, 2022
A Telegram Bot to Play Audio in Voice Chats With Youtube and Deezer support. Supports Live streaming from youtube Supports Mega Radio Fm Streamings

Bot To Stream Musics on PyTGcalls with Channel Support. A Telegram Bot to Play Audio in Voice Chats With Supports Live streaming from youtube and Mega

Shamil Habeeb 37 Dec 15, 2022