arr: Add restic backup
This commit is contained in:
parent
363ce9ae6f
commit
64b85c0c40
2 changed files with 23 additions and 0 deletions
|
|
@ -20,6 +20,9 @@ arrstack_puid: "{{ puid | default(1000) }}"
|
||||||
arrstack_pgid: "{{ pgid | default(100) }}"
|
arrstack_pgid: "{{ pgid | default(100) }}"
|
||||||
arrstack_umask_set: "{{ umask_set | default('022') }}"
|
arrstack_umask_set: "{{ umask_set | default('022') }}"
|
||||||
|
|
||||||
|
arrstack_restic_enable: true
|
||||||
|
arrstack_restic_cron: 0 30 2 * * *
|
||||||
|
|
||||||
arrstack_env_dir: /opt/arrstack
|
arrstack_env_dir: /opt/arrstack
|
||||||
arrstack_serve_dir: /srv
|
arrstack_serve_dir: /srv
|
||||||
arrstack_serve_dir_create: true
|
arrstack_serve_dir_create: true
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,26 @@ services:
|
||||||
caddy: "{{ arrstack_gonic_subdomain }}"
|
caddy: "{{ arrstack_gonic_subdomain }}"
|
||||||
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}"
|
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}"
|
||||||
|
|
||||||
|
{% if restic_enable is not undefined and not false and arrstack_restic_enable is not undefined and not false %}
|
||||||
|
backup:
|
||||||
|
image: mazzolino/restic
|
||||||
|
hostname: "{{ ansible_hostname }}"
|
||||||
|
environment:
|
||||||
|
TZ: "{{ restic_tz }}"
|
||||||
|
BACKUP_CRON: "{{ arrstack_restic_cron }}"
|
||||||
|
RESTIC_REPOSITORY: "{{ restic_repo }}"
|
||||||
|
RESTIC_PASSWORD: "{{ restic_pass }}"
|
||||||
|
AWS_ACCESS_KEY_ID: "{{ restic_s3_key }}"
|
||||||
|
AWS_SECRET_ACCESS_KEY: "{{ restic_s3_secret }}"
|
||||||
|
RESTIC_BACKUP_ARGS: >-
|
||||||
|
--tag arr
|
||||||
|
RESTIC_BACKUP_SOURCES: "/backup"
|
||||||
|
volumes:
|
||||||
|
{% if restic_repo is regex('^/.+') %}
|
||||||
|
- "{{ restic_repo }}:{{ restic_repo }}"
|
||||||
|
{% endif %}
|
||||||
|
- "{{ arrstack_env_dir }}:/backup/{{ arrstack_env_dir }}"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
caddy:
|
caddy:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue