$ docker build --build-arg VERSION=$RCLONE_VERSION -t rclone .
# docker build --build-arg VERSION=v1.45 -t rclone .
Besides rclone
this container also features inotify
.
$ docker run --rm -it travelping/rclone:latest --help
$ docker run --rm -it --entrypoint=/bin/sh travelping/rclone:latest
All inotify-events can be neatly logged using this command:
inotifywait -mr --timefmt '%H:%M' --format '%T %w %e %f' /data/"
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