arr: Add restic backup

This commit is contained in:
Marty Oehme 2025-07-18 21:05:16 +02:00
parent 363ce9ae6f
commit 64b85c0c40
Signed by: Marty
GPG key ID: 4E535BC19C61886E
2 changed files with 23 additions and 0 deletions

View file

@ -290,6 +290,26 @@ services:
caddy: "{{ arrstack_gonic_subdomain }}"
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:
caddy: