|
5 months ago | |
---|---|---|
hooks | 11 months ago | |
tests | 1 year ago | |
.dockerignore | 2 years ago | |
.gitignore | 1 year ago | |
.travis.yml | 2 years ago | |
Dockerfile | 5 months ago | |
LICENSE | 3 years ago | |
Makefile | 11 months ago | |
Readme.md | 2 years ago | |
backup.sh | 1 year ago | |
cron-exec.sh | 1 year ago | |
docker-compose.yaml | 1 year ago | |
healthcheck.sh | 1 year ago | |
restore.sh | 1 year ago | |
start.sh | 1 year ago | |
verify.sh | 2 years ago |
Mount any directories you'd like to back up as a volume and run
Variable | Default | Description |
---|---|---|
AWS_ACCESS_KEY_ID | Required for writing to S3 or Minio | |
AWS_SECRET_ACCESS_KEY | Required for writing to S3 or Minio | |
B2_ACCOUNT_ID | Required for writing to B2 | |
B2_ACCOUNT_KEY | Required for writing to B2 | |
BACKUP_DEST | /backups | Destination to store backups (See restic documenation) |
CLEANUP_COMMAND | Optional restic arguments for forget to execute after backups to clean older ones out (eg. "--prune --keep-last 2"). See forget |
|
CRON_SCHEDULE | If you want to periodic incremental backups on a schedule, provide it here. By default we just backup once and exit | |
OPT_ARGUMENTS | Any additional arguments to provide to the restic command | |
RESTIC_PASSWORD | Passphrase to use for encryption | |
PATH_TO_BACKUP | /data | The path to the directory you wish to backup |
RESTORE_ON_EMPTY_START | Set this to "true" and if the $PATH_TO_BACKUP is empty, it will restore the latest backup. This can be used for auto recovery from lost data |
|
SKIP_ON_START | Skips backup on start if set to "true" | |
VERIFY_CRON_SCHEDULE | If you want to verify your backups on a schedule, provide it here |
Hostname is used for identifying what you are backing up. You may want to specify this on your container.
Mount all volumes from your existing container with --volumes-from
and then back up by providing the paths to those volumes. If there are more than one volumes, you'll want to use the above tip for mulitple backup sources
On your running container, execute /restore.sh
. That should be that! Eg. docker exec my_backup_container /restore.sh