Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/b2un0/docker-rsync
simple docker container to run scheduled rsync with custom rsync options
https://github.com/b2un0/docker-rsync
docker rsync
Last synced: 28 days ago
JSON representation
simple docker container to run scheduled rsync with custom rsync options
- Host: GitHub
- URL: https://github.com/b2un0/docker-rsync
- Owner: b2un0
- License: mit
- Created: 2020-01-03T21:42:10.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-23T08:43:12.000Z (12 months ago)
- Last Synced: 2023-11-23T09:24:22.398Z (12 months ago)
- Topics: docker, rsync
- Language: Shell
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker scheduled rsync
![](https://img.shields.io/github/license/b2un0/docker-rsync.svg)
![](https://img.shields.io/docker/pulls/b2un0/rsync.svg)
![](https://img.shields.io/docker/stars/b2un0/rsync.svg)
![](https://img.shields.io/docker/image-size/b2un0/rsync.svg)
![](https://github.com/b2un0/docker-rsync/workflows/container/badge.svg)simple docker container to run scheduled rsync with custom rsync options
## one shot example
```bash
docker run -it --rm ghcr.io/b2un0/docker-rsync rsync --version
```## scheduled example
`docker-compose.yaml`
```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
```text
+ Folder_A/***+ Folder_B/Every***
+ Folder_C/BLA.ext
+ Folder_D/
+ Folder_D/SUB_FOLDER/***
```