2023-12-29 18:07:08 +00:00
|
|
|
{# code: language=ansible-jinja #}
|
2023-12-23 16:52:27 +00:00
|
|
|
# THIS FILE IS MANAGED BY ANSIBLE
|
|
|
|
|
2023-11-03 22:38:15 +00:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
services:
|
|
|
|
backup:
|
|
|
|
image: mazzolino/restic:{{ apps_vars.restic.version }}
|
|
|
|
restart: always
|
2024-02-24 21:02:15 +00:00
|
|
|
hostname: {{ hostname }}
|
|
|
|
domainname: {{ fqdn }}
|
2023-11-03 22:38:15 +00:00
|
|
|
environment:
|
|
|
|
RUN_ON_STARTUP: false
|
2024-03-01 21:29:56 +00:00
|
|
|
BACKUP_CRON: 0 0 * * * *
|
2023-11-03 23:38:08 +00:00
|
|
|
RESTIC_REPOSITORY: b2:{{ restic.b2.bucket }}:{{ restic.repo.path }}
|
|
|
|
RESTIC_PASSWORD: {{ restic.repo.password }}
|
2023-11-03 22:38:15 +00:00
|
|
|
RESTIC_BACKUP_SOURCES: /mnt/volumes
|
|
|
|
RESTIC_BACKUP_ARGS: >-
|
2023-11-05 17:27:49 +00:00
|
|
|
--tag data-volumes
|
2023-11-03 22:38:15 +00:00
|
|
|
--exclude '*.tmp'
|
|
|
|
--verbose
|
|
|
|
RESTIC_FORGET_ARGS: >-
|
2024-03-01 21:29:56 +00:00
|
|
|
--keep-last 12
|
2023-11-03 22:38:15 +00:00
|
|
|
--keep-daily 7
|
|
|
|
--keep-weekly 5
|
|
|
|
--keep-monthly 12
|
|
|
|
B2_ACCOUNT_ID: {{ restic.b2.id }}
|
|
|
|
B2_ACCOUNT_KEY: {{ restic.b2.key }}
|
|
|
|
TZ: {{ timezone }}
|
|
|
|
volumes:
|
2023-12-28 16:19:51 +00:00
|
|
|
{% for app in apps_backup|sort %}
|
2023-11-05 17:27:49 +00:00
|
|
|
- "{{ apps_data_root }}/{{ app }}/data:/mnt/volumes/{{ app }}:ro"
|
|
|
|
{% endfor %}
|
2024-03-01 21:34:27 +00:00
|
|
|
- "./data:/mnt/restore:rw"
|
2023-11-03 22:38:15 +00:00
|
|
|
|
|
|
|
prune:
|
|
|
|
image: mazzolino/restic:{{ apps_vars.restic.version }}
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
RUN_ON_STARTUP: false
|
2024-03-01 21:38:50 +00:00
|
|
|
PRUNE_CRON: 0 45 3 * * *
|
2023-11-03 23:38:08 +00:00
|
|
|
RESTIC_REPOSITORY: b2:{{ restic.b2.bucket }}:{{ restic.repo.path }}
|
|
|
|
RESTIC_PASSWORD: {{ restic.repo.password }}
|
2023-11-03 22:38:15 +00:00
|
|
|
RESTIC_PRUNE_ARGS: >-
|
|
|
|
--verbose
|
|
|
|
B2_ACCOUNT_ID: {{ restic.b2.id }}
|
|
|
|
B2_ACCOUNT_KEY: {{ restic.b2.key }}
|
|
|
|
TZ: {{ timezone }}
|
|
|
|
|
|
|
|
check:
|
|
|
|
image: mazzolino/restic:{{ apps_vars.restic.version }}
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
RUN_ON_STARTUP: false
|
2024-03-01 21:38:50 +00:00
|
|
|
CHECK_CRON: 0 45 4 * * *
|
2023-11-03 23:38:08 +00:00
|
|
|
RESTIC_REPOSITORY: b2:{{ restic.b2.bucket }}:{{ restic.repo.path }}
|
|
|
|
RESTIC_PASSWORD: {{ restic.repo.password }}
|
2023-11-03 22:38:15 +00:00
|
|
|
RESTIC_CHECK_ARGS: >-
|
|
|
|
--verbose
|
|
|
|
B2_ACCOUNT_ID: {{ restic.b2.id }}
|
|
|
|
B2_ACCOUNT_KEY: {{ restic.b2.key }}
|
|
|
|
TZ: {{ timezone }}
|