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
An asyncio Python wrapper around the Discord API, forked off of Rapptz's Discord.py.

Novus A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. A full fork of Rapptz's Discord.py library, with

Voxel Fox 60 Jan 03, 2023
Python client library for Postmark API

Postmarker Python client library for Postmark API. Gitter: https://gitter.im/Stranger6667/postmarker Installation Postmarker can be obtained with pip:

Dmitry Dygalo 109 Dec 13, 2022
Project glow is an open source bot worked on by many people to create a good and safe moderation bot for all

Project Glow Greetings, I see you have stumbled upon project glow. Project glow is an open source bot worked on by many people to create a good and sa

Glowstikk 24 Sep 29, 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
Ciclo 1 - MisiónTIC - UIS (Retos)

misiontic_uis Ciclo 1 - MisiónTIC - UIS Reto 1: Fundamentos del Lenguaje Python Reto 2: Estructuras de Control Condicional Reto 3: Estructuras de Cont

9 May 24, 2022
Automation application was made by me using Google, Sheet and Slack APIs with Python.

README This application is used to transfer the data in the xlsx document we have to the Google Drive environment and calculate the "total budget" wit

3 Apr 12, 2022
Ark API Wrapper in Python

Pythark Ark API Wrapper in Python. Built with Python Requests Installation Pythark uses Arky to create a new transaction, if you want to use this feat

Jolan 14 Mar 11, 2021
Exports saved posts and comments on Reddit to a csv file.

reddit-saved-to-csv Exports saved posts and comments on Reddit to a csv file. Columns: ID, Name, Subreddit, Type, URL, NoSFW ID: Starts from 1 and inc

70 Jan 02, 2023
A code that can make your 5 accounts stay 24/7 in a discord voice channel!

Voicecord A code that can make your 5 accounts stay 24/7 in a discord voice channel! Usage ・Fork the repo ・Clone it to replit ・Install the required pa

DraKenCodeZ 3 Jan 09, 2022
This is a small package to interact with the OpenLigaDB API.

OpenLigaDB This is a small package to interact with the OpenLigaDB API. Installation Run the following to install: pip install openligadb Usage from o

1 Dec 31, 2021
WhatsApp API Python ChatBot

WhatsApp Api Python - Esta documentação tem como objetivo exemplificar o uso do Moorse Whatsapp API na linguagem Python.

Douglas Alves 2 Jan 06, 2022
Efetuar teste de automação usando linguagem gherkin

🚀 Teste-de-Automação - QA---CI-T 🚀 Descrição • Primeira Parte • Segunda Parte • Terceira Parte Contributors Descrição Efetuamos testes de automação

Eliel martins 6 Dec 07, 2021
A.I and game for gomoku, working only on windows

Gomoku (A.I of gomoku) The goal of the project is to create an artificial intelligence of gomoku. Goals Beat the opponent. Requirements Python 3.7+ Wo

Luis Rosario 13 Jun 20, 2021
Migrate BiliBili watched anime to Bangumi

说明 之前为了将B站看过的动画迁移到bangumi写的, 本来只是自己用, 但公开可能对其他人会有帮助. 仓库最近无法维护, 程序有很多缺点, 欢迎 PR 和 Contributors 使用说明 Python版本要求:Python 3.8+ 使用前安装依赖包: pip install -r requ

51 Sep 08, 2022
wrapper for facebook messenger

pyfacebook pyfacebook library for python. Requirements common Help Got a question? File a GitHub issue. Contributing Bug Reports & Feature Requests Pl

Luis Mayta 3 Nov 12, 2021
Best Buy purchase bot

B3 Best-Buy-Bot. Written in Python NOTICE: Don't be a disgrace to society. Don't use this for any mass buying/reselling purposes. About B3 is a bot th

Dogey11 8 Aug 15, 2022
AnyAPI is a library that helps you to write any API wrapper with ease and in pythonic way.

AnyAPI AnyAPI is a library that helps you to write any API wrappers with ease and in pythonic way. Features Have better looking code using dynamic met

Fatih Kilic 129 Sep 20, 2022
The official wrapper for spyse.com API, written in Python, aimed to help developers build their integrations with Spyse.

Python wrapper for Spyse API The official wrapper for spyse.com API, written in Python, aimed to help developers build their integrations with Spyse.

Spyse 15 Nov 22, 2022
A Python library to access Instagram's private API.

Instagram Private API A Python wrapper for the Instagram private API with no 3rd party dependencies. Supports both the app and web APIs. Overview I wr

2.6k Jan 05, 2023