feat(restic): Add restic backup maintenance stack
Sets up regular backup maintenance for a restic (S3) backend, and enables global variables for other roles to use for their individual backup. Example found in nextcloud role.
This commit is contained in:
parent
eaeeb4ed6c
commit
135aadf3a0
8 changed files with 139 additions and 19 deletions
31
roles/restic/templates/docker-stack.yml.j2
Normal file
31
roles/restic/templates/docker-stack.yml.j2
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
prune:
|
||||
image: "{{ stack_image }}:{{ restic_version }}"
|
||||
hostname: docker
|
||||
environment:
|
||||
- "TZ={{ restic_timezone }}"
|
||||
- SKIP_INIT: "true"
|
||||
# go-cron starts w seconds
|
||||
- "PRUNE_CRON={{ restic_prune_cron }}"
|
||||
- RESTIC_FORGET_ARGS: "{{ restic_forget_args }}"
|
||||
- "RESTIC_REPOSITORY={{ restic_repo }}"
|
||||
- "AWS_ACCESS_KEY_ID={{ restic_s3_key }}"
|
||||
- "AWS_SECRET_ACCESS_KEY={{ restic_s3_secret }}"
|
||||
- "RESTIC_PASSWORD={{ restic_pass }}"
|
||||
|
||||
check:
|
||||
image: "{{ stack_image }}:{{ restic_version }}"
|
||||
hostname: docker
|
||||
environment:
|
||||
- "TZ={{ restic_timezone }}"
|
||||
- SKIP_INIT: "true"
|
||||
- RUN_ON_STARTUP: "false"
|
||||
# go-cron starts w seconds
|
||||
- "CHECK_CRON={{ restic_check_cron }}"
|
||||
- RESTIC_CHECK_ARGS: "{{ restic_check_args }}"
|
||||
- "RESTIC_REPOSITORY={{ restic_repo }}"
|
||||
- "AWS_ACCESS_KEY_ID={{ restic_s3_key }}"
|
||||
- "AWS_SECRET_ACCESS_KEY={{ restic_s3_secret }}"
|
||||
- "RESTIC_PASSWORD={{ restic_pass }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue