Giter VIP home page Giter VIP logo

docker-rclone's Introduction

docker-rclone

Docker image to perform a rclone sync based on a cron schedule, with healthchecks.io monitoring.

rclone is a command line program to sync files and directories to and from:

  • Google Drive
  • Amazon S3
  • Openstack Swift / Rackspace cloud files / Memset Memstore
  • Dropbox
  • Google Cloud Storage
  • Amazon Drive
  • Microsoft OneDrive
  • Hubic
  • Backblaze B2
  • Yandex Disk
  • SFTP
  • FTP
  • HTTP
  • The local filesystem

Usage

Configure rclone

rclone needs a configuration file where credentials to access different storage provider are kept.

By default, this image uses a file /config/rclone.conf and a mounted volume may be used to keep that information persisted.

A first run of the container can help in the creation of the file, but feel free to manually create one.

$ mkdir config
$ docker run --rm -it -v $(pwd)/config:/config bcardiff/rclone

Perform sync in a daily basis

A few environment variables allow you to customize the behavior of the sync:

  • SYNC_SRC source location for rclone sync command
  • SYNC_DEST destination location for rclone sync command
  • CRON crontab schedule 0 0 * * * to perform sync every midnight
  • CRON_ABORT crontab schedule 0 6 * * * to abort sync at 6am
  • FORCE_SYNC set variable to perform a sync upon boot
  • CHECK_URL healthchecks.io url or similar cron monitoring to perform a GET after a successful sync
  • SYNC_OPTS additional options for rclone sync command. Defaults to -v
  • TZ set the timezone to use for the cron and log America/Argentina/Buenos_Aires
$ docker run --rm -it -v $(pwd)/config:/config -v /path/to/source:/source -e SYNC_SRC="/source" -e SYNC_DEST="dest:path" -e TZ="America/Argentina/Buenos_Aires" -e CRON="0 0 * * *" -e CRON_ABORT="0 6 * * *" -e FORCE_SYNC=1 -e CHECK_URL=https://hchk.io/hchk_uuid bcardiff/rclone

See rclone sync docs for source/dest syntax and additional options.

docker-rclone's People

Contributors

ameketa avatar bcardiff avatar danny-cheung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-rclone's Issues

Use cron shortcuts

Is it possible to use the unix cron shortcuts on both cron expressions?.

Examples of shortcuts: @daily @hourly @weekly

Healthcheck inclusion

Hello all,

(reference: https://docs.docker.com/engine/reference/builder/#healthcheck)

I wanted to raise a discussion to define a healthcheck for this image, either in the image itself or as a post-defined instruction for run / docker-compose.

Side not on the existing healthcheck.io integration: Imho these two can be implemented in parallel.

Which command do you think is best suited to check the health of the image? It would be easy to check that cron is running but a better health indicator would check the success of actual cron jobs.

Any suggestions? What works for you? Are you interested to implement something in the code of this image?

Best!

Automated Rebuild

This image is currently running 1.47 while I need some features in 1.49. Instead of manually triggering builds or waiting for a change to this repo, you set up some service like Distill.io or Wachete or Zapier to trigger a new build via Webhook when rclone releases change version. Let me know if you need help with this, I've set it up for a few docker builds in the past.

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.