Duplicacy
azinchen/duplicacy
is a Docker image 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.0.1
.
Supported Architectures
The image supports multiple architectures such as amd64
, x86
, arm/v6
, arm/v7
and arm64
.
Starting an Duplicacy instance
You can run the following command to stand up 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.
BACKUP_CRON
- Set schedule forduplicacy backup
command in format for crontab file. Theduplicacy backup
command doesn't run ifBACKUP_CRON
is not set.PRUNE_CRON
- Set schedule forduplicacy prune
command in format for crontab file. Theduplicacy prune
command doesn't run ifPRUNE_CRON
is not set.BACKUP_END_CRON
- Set schedule for force killing of duplicacy backup process in format for crontab file. The force killing of duplicacy backup process doesn't run ifBACKUP_END_CRON
is not set.PRIORITY_LEVEL
- Runduplicacy
with an adjusted niceness, which affects process scheduling. Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). Default value is 10.GLOBAL_OPTIONS
- Set global options for everyduplicacy
command, see "Global options details" for details. Global options are not set by default.BACKUP_OPTIONS
- Set options for everyduplicacy backup
command, seeduplicacy backup
command description for details. Backup options are not set by default.PRE_BACKUP_SCRIPT
- Give path of a custom script to run just before a backup starts. You could use docker command in pre script by adding-v /var/run/docker.sock:/var/run/docker.sock
.POST_BACKUP_SCRIPT
- Give path of a custom script to run once backup completes. You could use docker command in post script by adding-v /var/run/docker.sock:/var/run/docker.sock
.PRUNE_OPTIONS
- Set options for everyduplicacy prune
command, seeduplicacy prune
command description for details. Prune options are not set by default.POST_PRUNE_SCRIPT
- Give path of a custom script to run once prune completes. You could use docker command in post script by adding-v /var/run/docker.sock:/var/run/docker.sock
.RUN_JOB_IMMEDIATELY
- Set toyes
to runduplicacy backup
and/orduplicacy prune
command at container startup. Immeditely jobs don't start by default.SNAPSHOT_ID
- Set snapshot id, seeduplicacy init
command description for details.STORAGE_URL
- Set storage url, seeduplicacy 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 forduplicacy prune
command, seeduplicacy 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, seeduplicacy 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 number of lines from the beginning and the end of log and put it to the body of email report. Default value is10
.
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.