Provides an easy to use docker container for running restic backup.
Written with Synology NAS products as the target platform, but will run on anything that can run a docker container.
- Have a system with docker daemon properly installed. You can find more information on that from the official docker installation documentation.
- If you are setting this container up on a Synology NAS, ensure you have the Synology docker app installed.
- If you do not have some sort of restic compatible storage account setup, where you will be sending your backups to, go ahead and get that setup. A list of supported cloud account types can be found here.
Images are hosted on Docker Hub
latest
is built from HEAD of master of the restic repository, combined with the HEAD of master, of this repository.dev
is built from HEAD of master of the restic repository, and combined with the dev branch, of this repository.
There are pinned docker images for each restic release, found on the official restic project. These are built automatically each night, so if there is a new release of restic, expect there to be a new version of this container available the next day.
- [REQUIRED]
RESTIC_REPOSITORY
- the location of your restic repository. For BackBlaze B2 that would beb2:<bucket-name>:/
- [REQUIRED]
RESTIC_PASSWORD
- repository password - [OPTIONAL]
BACKUP_CRON
- default value is0 1 * * *
- [OPTIONAL]
RESTIC_BACKUP_ARGS
- example:-o b2.connections=20
- See the full list of options in the restic docs.
- [OPTIONAL]
FORGET_CRON
- example:1 3 * * 0
- [OPTIONAL]
RESTIC_FORGET_ARGS
- example:--keep-last 7
or--keep-last 7 --prune
if you wish to perform a prune operation at the same time. - [OPTIONAL]
PRUNE_CRON
- example:1 3 * * 1
- [OPTIONAL]
RESTIC_TAG
- default value islatest
- [OPTIONAL]
TZ
- timezone, default isAmerica/New_York
. Set this value if you want your log entries to have the relevant time in them.
- [REQUIRED]
B2_ACCOUNT_ID
- [REQUIRED]
B2_ACCOUNT_KEY
- [REQUIRED]
AWS_ACCESS_KEY_ID
- [REQUIRED]
AWS_SECRET_ACCESS_KEY
- Mount all folders to the
/data
folder on the container.
Logs can be found in /var/log/restic
on the container.
Some of this scripting is a direct fork of labaro's work found here.