restic: Add stack
Adapted from cloudserve-infrastructure, implements a backup stack using restic. The actual backups have to be implemented by individual other roles but this sets up initialization, pruning and checking of a repository.
This commit is contained in:
parent
93876315ca
commit
86d49a756b
7 changed files with 146 additions and 0 deletions
24
roles/restic/defaults/main.yml
Normal file
24
roles/restic/defaults/main.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
# inherited from global
|
||||
restic_enable: true
|
||||
restic_tz: "{{ timezone | default('America/Chicago') }}"
|
||||
|
||||
restic_version: latest
|
||||
restic_auto_init: true
|
||||
|
||||
restic_prune_cron: 0 0 4 * * * # go-cron starts with seconds in first pos
|
||||
restic_forget_args: --prune --keep-last 14 --keep-daily 2 --keep-weekly 2
|
||||
|
||||
restic_check_cron: 0 30 4 * * SUN
|
||||
restic_check_args: --read-data-subset=15%
|
||||
|
||||
restic_repo: /opt/stack_restic_backup
|
||||
restic_pass: my-restic-pass
|
||||
restic_s3_key:
|
||||
restic_s3_secret:
|
||||
|
||||
# S3 example
|
||||
# restic_repo: s3.eu-central-1.wasabisys.com/myrepo
|
||||
# restic_pass: <restic-pass>
|
||||
# restic_s3_key: <s3-key>
|
||||
# restic_s3_secret: <s3-secret>
|
||||
Loading…
Add table
Add a link
Reference in a new issue