Skip to content

KilianDargel/docker-rclone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Build

$ docker build --build-arg VERSION=$RCLONE_VERSION -t rclone .
# docker build --build-arg VERSION=v1.45 -t rclone .

Usage

Besides rclone this container also features inotify.

Run rclone (default entrypoint)

$ docker run --rm -it travelping/rclone:latest --help

Run shell

$ docker run --rm -it --entrypoint=/bin/sh travelping/rclone:latest

Debugging

All inotify-events can be neatly logged using this command:

inotifywait -mr --timefmt '%H:%M' --format '%T %w %e %f' /data/"

Script

Wating for the close_write event, this command only pushes "finished" data to the destination.

watchnames=''
[ -d /data/ ] && watchnames="$watchnames /data/"
inotifywait --monitor -e close_write --format %w%f $watchnames | while read FILE
do
  echo "$FILE is finished. Moving to data/finished/"
  mv $FILE/ data/finished/
  rclone move /data/finished/ onedrive:data/
done

Endpoints checked:

  • SFTP
  • Onedrive
  • S3

About

Docker image of rclone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%