Debian 8 with *cron*, *ssh* and *rsync* for periodic or one-time remote *rsync* copy jobs.
10K+
docker-periodic-rsync is a Docker image based on Debian 8 with cron, ssh and rsync for one-time or periodic remote rsync copy jobs.
Open source project:
Requirements:
/root/.ssh: mount your passwordless SSH public and private keys (id_rsa/id_rsa.pub, chown to user root)/data: mount preferred target directory/etc/crontab: mount your crontab file (for periodic usage)For one-time usage (need specify command):
$ docker run -it --rm -v /srv/backup/.ssh:/root/.ssh -v /srv/backup/data:/data gw000/periodic-rsync rsync -zave ssh [email protected]:dir/ /data
For periodic usage (prepare crontab file /srv/backup/cron.d/backup):
# /etc/cron.d/backup: system-wide crontab
SHELL=/bin/sh
# m h dom mon dow user command
*/5 * * * * root rsync -zave ssh [email protected]:dir/ /data
$ docker run -d -v /srv/backup/.ssh:/root/.ssh -v /srv/backup/cron.d:/etc/cron.d -v /srv/backup/data:/data --name backup gw000/periodic-rsync
If you encounter any bugs or have feature requests, please file them in the issue tracker or even develop it yourself and submit a pull request over GitHub.
Copyright © 2016 gw0 [http://gw.tnode.com/] <[email protected]>
This library is licensed under the GNU Affero General Public License 3.0+ (AGPL-3.0+). Note that it is mandatory to make all modifications and complete source code of this library publicly available to any user.
docker pull gw000/periodic-rsync:latest