Docker image to perform a rclone move based on a cron schedule, with healthchecks.io monitoring.
rclone is a command line program to move 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
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 robostlund/rclone-move
A few environment variables allow you to customize the behavior of the move:
MOVE_SRC
source location forrclone move
commandMOVE_DEST
destination location forrclone move
commandCRON
crontab schedule0 0 * * *
to perform move every midnightCRON_ABORT
crontab schedule0 6 * * *
to abort move at 6amFORCE_MOVE
set variable to perform a move upon bootCHECK_URL
healthchecks.io url or similar cron monitoring to perform aGET
after a successful moveMOVE_OPTS
additional options forrclone move
command. Defaults to-v
TZ
set the timezone to use for the cron and logAmerica/Argentina/Buenos_Aires
$ docker run --rm -it -v $(pwd)/config:/config -v /path/to/source:/source -e MOVE_SRC="/source" -e MOVE_DEST="dest:path" -e TZ="America/Argentina/Buenos_Aires" -e CRON="0 0 * * *" -e CRON_ABORT="0 6 * * *" -e FORCE_MOVE=1 -e CHECK_URL=https://hchk.io/hchk_uuid robinostlund/rclone-move
See rclone move docs for source/dest syntax and additional options.