Docker image to perform a rclone copy based on a cron schedule, with healthchecks.io monitoring.
rclone is a command line program to copy files and directories to and from:
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-copy
A few environment variables allow you to customize the behavior of the copy:
COPY_SRC source location for rclone copy commandCOPY_DEST destination location for rclone copy commandCRON crontab schedule 0 0 * * * to perform copy every midnightCRON_ABORT crontab schedule 0 6 * * * to abort copy at 6amFORCE_COPY set variable to perform a copy upon bootCHECK_URL healthchecks.io url or similar cron monitoring to perform a GET after a successful copyCOPY_OPTS additional options for rclone copy command. Defaults to -vTZ 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 COPY_SRC="/source" -e COPY_DEST="dest:path" -e TZ="America/Argentina/Buenos_Aires" -e CRON="0 0 * * *" -e CRON_ABORT="0 6 * * *" -e FORCE_COPY=1 -e CHECK_URL=https://hchk.io/hchk_uuid robinostlund/rclone-copy
See rclone copy docs for source/dest syntax and additional options.
Content type
Image
Digest
Size
17.4 MB
Last updated
about 5 years ago
docker pull robostlund/rclone-copy