simple docker container to run scheduled rsync with custom rsync options
docker run -it --rm ghcr.io/b2un0/docker-rsync rsync --version
docker-compose.yaml
services:
something:
image: ghcr.io/b2un0/rsync:latest
restart: unless-stopped
network_mode: bridge
# command: "file-sync" # for testing purpose
volumes:
- /here/get/my/stuff/:/here/get/my/stuff/:ro
- ./config/syncer.list:/tmp/include.list:ro
- ~/.ssh/id_ed25519:/tmp/ssh_key:ro
environment:
SCHEDULE: "15 3 * * *" # https://crontab.guru/
HOST: "some.target.tld"
PORT: 1337
LOGIN: "syncer"
SOURCE: "/here/get/my/stuff/"
TARGET: "/volume1/stuff/"
SSH_OPTIONS: "-i /tmp/ssh_key -o StrictHostKeyChecking=no"
# RSYNC_OPTIONS: "--rsync-path=/bin/rsync" # required for synology example
# RSYNC_OPTIONS: "--list-only"
# RSYNC_OPTIONS: "--dry-run"
/config/syncer.list
rsync include list
+ Folder_A/***
+ Folder_B/Every***
+ Folder_C/BLA.ext
+ Folder_D/
+ Folder_D/SUB_FOLDER/***