/duplicacy

Automated backups with Docker and duplicacy, with backup rotation, email notifications

Primary LanguageShellMIT LicenseMIT

Duplicacy

Docker pulls Docker image size GitHub release date GitHub build GitHub last commit

azinchen/duplicacy is a Docker image created to easily perform automated backups. It uses Duplicacy under the hood, and therefore supports:

  • Multiple storage backends: S3, Backblaze B2, Hubic, Dropbox, SFTP...
  • Client-side encryption
  • Deduplication
  • Multi-versioning
  • ... and more generally, all the features that duplicacy has.

azinchen/duplicacy uses Duplicacy Command Line version 3.1.0.

Supported Architectures

The image supports multiple architectures such as amd64, x86, arm/v6, arm/v7 and arm64.

Starting a Duplicacy instance

You can run the following command to launch a standalone instance of Duplicacy on Docker:

docker run \
  -v path_to_data:/data \
  -e BACKUP_CRON="0 1 * * *" \
  -e SNAPSHOT_ID="id" \
  -e STORAGE_URL="url" \
  azinchen/duplicacy

Environment variables

Container images are configured using environment variables passed at runtime.

Parameter Function
BACKUP_CRON Set schedule for duplicacy backup command formatted for crontab file. The duplicacy backup command doesn't run if BACKUP_CRON is not set.
PRUNE_CRON Set schedule for duplicacy prune command formatted for crontab file. The duplicacy prune command doesn't run if PRUNE_CRON is not set.
BACKUP_END_CRON Set schedule for force killing of duplicacy backup process formatted for crontab file. The force killing of duplicacy backup process doesn't run if BACKUP_END_CRON is not set.
GLOBAL_OPTIONS Set global options for each duplicacy command, see "Global options details" for details. Global options are not set by default.
BACKUP_OPTIONS Set options for each duplicacy backup command, see duplicacy backup command description for details. Backup options are not set by default.
PRUNE_OPTIONS Set options for each duplicacy prune command, see duplicacy prune command description for details. Prune options are not set by default.
RUN_JOB_IMMEDIATELY Set to yes to run duplicacy backup and/or duplicacy prune command at container startup. The jobs don't start by default.
SNAPSHOT_ID Set snapshot id, see duplicacy init command description for details.
STORAGE_URL Set storage url, see duplicacy init command description for details. Duplicacy supports different storage providers, see "Supported storage backends" for details. Login credentials for storage url should be set using environment variables, see "Passwords, credentials and environment variables" for details.
JOB_RANDOM_DELAY Set maximum value of delay before job startup, in seconds. Jobs run without delay by default.
PRUNE_KEEP_POLICIES Set keep options for duplicacy prune command, see duplicacy prune command description for details. Several keep options can be set using semicolon as delimeter.
FILTER_PATTERNS Set filter patterns, see "Filters/Include exclude patterns" for details. Several filter patterns can be defined using semicolon as delimeter.
DUPLICACY_PASSWORD Enable encryption for storage and set password, see duplicacy init command description for details. Encryption is disabled by default.
EMAIL_HOSTNAME_ALIAS Set host alias in email reports. Hostname of container is used by default.
EMAIL_FROM Set sender email.
EMAIL_FROM_NAME Set sender name.
EMAIL_TO Set recipient email.
EMAIL_USE_TLS Enable encryption in session with SMTP server.
EMAIL_SMTP_SERVER Set SMTP server address.
EMAIL_SMTP_SERVER_PORT Set SMTP server port.
EMAIL_SMTP_LOGIN Set SMTP server login.
EMAIL_SMTP_PASSWORD Set SMTP server password.
EMAIL_LOG_LINES_IN_BODY Set the number of lines from the beginning and from the end of the log and put it in the body of the email report. Default value is 10.
SEND_REPORT_LEVEL Send email reports with level lower than defined. Possible values are all or error. Default value is all.
TZ Set time zone and daylight-saving time data. Possible values can be found here. Default value is UTC.

Disclaimer

This project uses Duplicacy Command Line version, which is free for personal use but requires purchasing a licence for non-trial commercial use. See the detailed terms here.

Issues

If you have any problems with or questions about this image, please contact me through a GitHub issue or email.