Skip to content

Instantly share code, notes, and snippets.

@zunjae
Last active January 2, 2021 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zunjae/aa36126a6120defe36dd43641614f1f9 to your computer and use it in GitHub Desktop.
Save zunjae/aa36126a6120defe36dd43641614f1f9 to your computer and use it in GitHub Desktop.
Rclone docker-compose backup locally to remote
version: "3"
services:
rclone-bun:
image: pfidr/rclone
restart: unless-stopped
volumes:
- ./rclone/config:/config
- $YOUR_LOCAL_DIRECTORY_YOU_WANT_TO_SYNC:/$ProjectNameGoesHere
environment:
# see more flags at https://hub.docker.com/r/pfidr/rclone/dockerfile
- "UID=${PUID}"
- "GID=${PGID}"
- "RCLONE_CMD=move"
- "TZ=Europe/Amsterdam"
- "SYNC_SRC=/$ProjectNameGoesHere"
- "SYNC_DEST=$ProjectNameGoesHere:"
- "CHECK_URL=https://hc-ping.com/.../"
# visit https://crontab.guru/
- "CRON=*/15 * * * *"
- "FORCE_SYNC=1"
- "SYNC_OPTS=-v"
1) Create a rclone.conf file on your local computer https://rclone.org/drive/
2) Edit the path in the volume section to point to your rclone configuration file
3) Update the $variables. Remove the $
- $YOUR_LOCAL_DIRECTORY_YOU_WANT_TO_SYNC:/$ProjectNameGoesHere
can become
- $HOME/KanonApp/Backup/AppData:/KanonSyncingService
4) Update the other environment variables to your likings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment