2021-01-26 18:57:06 +00:00
|
|
|
---
|
2022-11-25 20:41:37 +00:00
|
|
|
- name: Setup restic backup
|
2021-02-01 20:06:23 +00:00
|
|
|
docker_compose:
|
2021-01-26 19:40:22 +00:00
|
|
|
project_name: restic_backup
|
2022-11-25 20:41:37 +00:00
|
|
|
pull: true
|
2021-01-26 19:40:22 +00:00
|
|
|
definition:
|
|
|
|
version: '3.6'
|
|
|
|
services:
|
|
|
|
restic-backup:
|
2022-11-25 12:55:50 +00:00
|
|
|
image: mazzolino/restic:{{ services.restic.version }}
|
2021-01-26 19:40:22 +00:00
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
RUN_ON_STARTUP: "true"
|
|
|
|
BACKUP_CRON: "0 30 3 * * *"
|
2022-11-25 12:55:50 +00:00
|
|
|
RESTIC_REPOSITORY: "rest:https://{{ services.restic.user }}:{{ restic_secrets.user_password }}@{{ services.restic.domain }}/{{ services.restic.repository }}"
|
2022-11-08 19:45:03 +00:00
|
|
|
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
|
2021-01-26 19:40:22 +00:00
|
|
|
RESTIC_BACKUP_SOURCES: "/mnt/volumes"
|
|
|
|
RESTIC_BACKUP_ARGS: >-
|
|
|
|
--tag datacoop-volumes
|
|
|
|
--exclude='*.tmp'
|
|
|
|
--verbose
|
|
|
|
RESTIC_FORGET_ARGS: >-
|
|
|
|
--keep-last 10
|
|
|
|
--keep-daily 7
|
|
|
|
--keep-weekly 5
|
|
|
|
--keep-monthly 12
|
|
|
|
TZ: Europe/Copenhagen
|
|
|
|
volumes:
|
|
|
|
- /docker-volumes:/mnt/volumes:ro
|
2022-11-25 20:41:37 +00:00
|
|
|
|
2021-01-26 19:40:22 +00:00
|
|
|
restic-prune:
|
2022-11-25 12:55:50 +00:00
|
|
|
image: "mazzolino/restic:{{ services.restic.version }}"
|
2021-01-26 19:40:22 +00:00
|
|
|
environment:
|
|
|
|
RUN_ON_STARTUP: "true"
|
|
|
|
PRUNE_CRON: "0 0 4 * * *"
|
2022-11-25 12:55:50 +00:00
|
|
|
RESTIC_REPOSITORY: "rest:https://{{ services.restic.user }}:{{ restic_secrets.user_password }}@{{ services.restic.domain }}/{{ services.restic.repository }}"
|
2022-11-08 19:45:03 +00:00
|
|
|
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
|
2021-01-26 19:40:22 +00:00
|
|
|
TZ: Europe/copenhagen
|