HUB
Sign inSign up

glide/cron-rsync

By glide

•Updated over 5 years ago

Schedules rsync jobs

Image
3

10K+

glide/cron-rsync repository overview

⁠Docker cron rsync

⁠Usage

Example with a docker-compose.yml:

version: "3"

services:
  rsync:
    image: glide/cron-rsync:0.1
    volumes:
      - ~/.ssh:/host-ssh:ro
      - ./backup:/backup
    environment:
      RSYNC_CRONTAB: "* * * * *"
      RSYNC_OPTIONS: "-tv [email protected]:backup/*.tgz /backup"

Here we want to synchronize (download new files) from a remote server with rsync by SSH every minute.

Every minute this will be executed:

rsync -tv [email protected]:backup/*.tgz /backup

⁠Concept

The aim is to be able to mirror files (ie. backups) with a minimal installation required (only Docker)
The image is less than 4MB.

In order to synchronize files, rsync is included in the image.
Remote host rsyncs are also possible with the included SSH client.

Host SSH keys are used simply by mounting them in the container ~/.ssh:/host-ssh:ro.

Tag summary

Content type

Image

Digest

Size

3.7 MB

Last updated

about 7 years ago

docker pull glide/cron-rsync