Coder Social home page Coder Social logo

rclone_gdsa_uploader's Introduction

rclone GDSA uploader

A script to monitor a directory and its subdirectories for objects to be uploaded to your google gdrive using rclone. The script uses service accounts in a round robin approach.

Installation

Clone the repository using

git clone https://github.com/inkarnation/rclone_gdsa_uploader
mkdir rclone_gdsa_uploader/service_accounts
chmod +x rclone_gdsa_uploader/uploader.sh

Place your service account configurations in rclone_gdsa_uploader/service_accounts or in the directory configured in sa_dir. The service accounts need to be structured in incrementing .json files (e.g. 1.json, 2.json, ...).

You might configure a cronjob with e.g. crontab -e like (Using flock to prevent parallel executions):

*/15 * * * * /usr/bin/flock -n /tmp/rclone.lockfile /root/rclone_gdsa_uploader/uploader.sh

Modify /root/rclone_gdsa_uploader/uploader.sh to match the path to your cloned repository.

Make sure to adjust the variables in the script according your needs:

Variable Description Example
sa_dir Directory containing the service accounts $(pwd)"/service_accounts"
current_gdsa_file File to keep track of the service account to use next $(pwd)"/current_gdsa"
local_dir Directory containing the objects to upload /mnt/gmedia-local
rclone_config Path to your rclone config file /root/.config/rclone/rclone.conf
log_file Log file path /opt/rclone/logs/upload.log

rclone_gdsa_uploader's People

Contributors

inkarnation avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.