A headless rclone container that runs a cron service to allow for automated schedule of sync jobs.
Here's a basic command to get the container started:
docker run -d \
--restart=unless-stopped \
--name rclone-cron \
-v /path/to/config/storage:/root/.config/rclone \
-v /path/to/cron/storage:/etc/cron.d \
-v /path/to/local/storage:/mnt/local \
nuvious/rclone-cron:latest
NOTE: The /mnt/local example is optional. Local storage access may not be
needed or more than one entry may be desired. In any case the only required
mount paths are below:
| Container Path | Purpose |
|---|---|
| /root/.config/rclone | Rclone configuration storage |
| /etc/cron.d | Cron configuration |
After running you can create configurations by running commands in the container as follows:
$> docker exec -it rclone-cron rclone config
2024/05/07 17:54:03 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q>
For documentation on creating a remote configuration, refer to the rclone config documentation.
Cron jobs take standard cron syntax for the /etc/cron.d directory. Example
for creating a configuration below that syncs the home directory to a backup
folder to a remote named cloud:
$> docker exec -it rclone-cron /bin/bash
root@268f891fe179:/# cat > /etc/cron.d/test-proton << EOF
*/30 * * * * root rclone sync /home cloud:/home_backup
EOF
root@268f891fe179:/# exit
New configurations can be added dynamically without restarting the container.
If a configuration does not work, test your rclone command via
docker exec -it rclone-cron bash to ensure it is working. Failing that, open an
issue for debugging.
Content type
Image
Digest
sha256:0b482f3cd…
Size
96.6 MB
Last updated
7 months ago
docker pull nuvious/rclone-cron