Rsync backup through ssh using CRON and optional e-mail functionality!
10K+
Rsync backup through ssh using CRON and optional e-mail functionality!
Override them according to your requirements.
REMOTE_HOST # REQUIRED
REMOTE_PATH # REQUIRED
RSYNC_OPTIONS # default = '-a --delete'
RSYNC_SSH_KEY # default = /run/secrets/rsync_ssh_key [for best practice and increased security, use swarm secrets to mount the key]
USER # default = root
CRON_SCHEDULE # default = '0 0 * * *' [every day at 12am]
MAILTO # REQUIRED for mail functionality [do not include it and no e-mail is sent]
# The ENV vars below are required if MAILTO is set!
MAILFROM # REQUIRED [eg. [email protected]]
SMTP_HOST # REQUIRED [eg. smtp.gmail.com]
SMTP_PORT # REQUIRED [eg. 587]
SMTP_USER # REQUIRED [eg. [email protected]]
SMTP_PASSWD[_FILE] # REQUIRED [plain-text password or better, using _FILE and swarm secrets]
Use SWARM mode even with one HOST, the overhead is very low and you get all the magic swarm provides, like secret, config, etc!
Content type
Image
Digest
Size
7.7 MB
Last updated
about 6 years ago
docker pull ioagel/rsync-backup