Skip to content

hlj-toys/rsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsync in container

Both rsync server and client running in a docker container.

server

This server is based off of https://github.com/bfosberry/rsync with a few modifications.

Usage

Launch the container via docker:

  $ docker run -d -p 873 \
    -e USERNAME="myuser" \
    -e PASSWORD="mypassword" \
    -v /your/data-folder:/data betacz/rsync:server

In default, rsync server accepts a connection only from 192.168.0.0/16 and 172.12.0.0/12 for security reasons. You can override via an environment variable like this:

$ docker run -d -p 873 -e ALLOW='10.0.0.0/8 x.x.x.x/y' betacz/rsync:server

client

This client supports run rsync periodically.

Usage

$  docker run -d -v /your/data-folder:/data \
   -e SERVER_ADDR=<server>  \
   -e PORT=<port> \
   -e USER=<username> \
   -e RSYNC_PASSWORD=<password>  \
   -e DATA_TARGET=<target_folder> \
   -e SCHEDULE="<schedule>" \
   betacz/rsync:client <rsync options>

Schedule

Schedule can assigned as following syntax:

  • "15min": every 15 minutes.
  • "hourly": 0 minute every hour.
  • "daily": 02:00 every day.
  • "weekly": 03:00 on Sunday every week.
  • "monthly": 05:00 on 1st every month.
  • "5/* * * * *": any schedule by crontab syntax

License

Released under the GPL2 License.

About

rsync server and client in container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published