Skip to content

Docker image providing automated and encrypted backups to any storage provider supported by rclone.

License

Notifications You must be signed in to change notification settings

bfren/docker-backup

Repository files navigation

Docker Backup

GitHub release (latest by date) Docker Pulls Docker Image Size GitHub Workflow Status

Docker Repository - bfren ecosystem

Uses Duplicity and rclone to perform scheduled backups, using end-to-end encryption.

Usage:

# start container
#  .. see docker-compose.yml for a sample file
docker compose up -d

# configure rclone
#  .. ensure the remote storage name is the same as environment variable BACKUP_RCLONE_STORAGE
docker exec -it backup rclone-config

# run an initial full backup
docker exec backup dup-full

# verify backup files
docker exec backup dup-verify

# list backup files
docker exec backup dup-list

# restore a file or directory
#  .. restored file or directory will be put in the /restore volume
docker exec backup dup-restore-file /path/to/file/or/directory

Contents

Volumes

Volume Purpose
/b Anything mounted in here will be backed up.
/config Persistent duplicity and rclone configuration, plus log files.
/restore Restored files and directories are placed in here.

Environment Variables

Variable Values Description Default
BACKUP_COMMAND string The command to run on the schedule set by BACKUP_CRON. dup-default
BACKUP_CRON string Cron schedule on which backup will be run. 0 0 * * * - every day at midnight
BACKUP_PASSPHRASE string End-to-end encryption passphrase - if changed, backups cannot be restored. None - required
BACKUP_DUPLICITY_FULL_EVERY string How often to run a full backup (see here). 1M - one month
BACKUP_DUPLICITY_KEEP_FULL integer How many full backups to keep - more than this will be removed as part of the schedule. 3
BACKUP_DUPLICITY_VERBOSITY string The output verbosity of duplicity operations (error, warning, notice, info, debug). notice
BACKUP_DUPLICITY_VOLSIZE_IN_MB integer The size (in MB) of each volume in the backup set. 200
BACKUP_RCLONE_STORAGE string The name of the (configured) rclone storage provider. None - required
BACKUP_RCLONE_PATH string The root path within the storage provider in which to put backup files. /
BACKUP_RCLONE_CUSTOM_CMD string Use with BACKUP_COMMAND=rclone-custom to run rclone however you want using the configuration in /config. None
BACKUP_RCLONE_CUSTOM_ARG string Use with BACKUP_COMMAND=rclone-custom to run rclone however you want using the configuration in /config. None

Additionally you can use RCLONE_ to configure rclone. By default RCLONE_CHECKSUM is true to enable file checking based on checksum and date, not size.

Licence

MIT

Copyright

Copyright (c) 2022-2023 bfren (unless otherwise stated)

About

Docker image providing automated and encrypted backups to any storage provider supported by rclone.

Topics

Resources

License

Stars

Watchers

Forks

Packages