2023-09-30 14:25:06 +00:00
|
|
|
# vim: ft=yaml.docker-compose
|
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
services:
|
|
|
|
backup:
|
|
|
|
image: mazzolino/restic:{{ services.restic.version }}
|
|
|
|
restart: always
|
2024-03-29 20:01:50 +00:00
|
|
|
hostname: {{ inventory_hostname_short }}
|
|
|
|
domainname: {{ inventory_hostname }}
|
2023-09-30 14:25:06 +00:00
|
|
|
environment:
|
|
|
|
RUN_ON_STARTUP: false
|
|
|
|
BACKUP_CRON: "0 30 3 * * *"
|
2024-03-06 12:38:46 +00:00
|
|
|
RESTIC_REPOSITORY: sftp:{{ services.restic.remote_user }}@{{ services.restic.remote_domain }}:{{ services.restic.repository }}
|
2023-09-30 14:25:06 +00:00
|
|
|
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
|
|
|
|
RESTIC_BACKUP_SOURCES: /mnt/volumes
|
|
|
|
RESTIC_BACKUP_ARGS: >-
|
|
|
|
--tag datacoop-volumes
|
|
|
|
--exclude '*.tmp'
|
2024-01-10 17:03:39 +00:00
|
|
|
--exclude '/mnt/volumes/mastodon/mastodon_data/cache/'
|
2024-03-04 08:20:04 +00:00
|
|
|
--exclude '/mnt/volumes/restic/'
|
2023-09-30 14:25:06 +00:00
|
|
|
--verbose
|
|
|
|
RESTIC_FORGET_ARGS: >-
|
|
|
|
--keep-last 10
|
|
|
|
--keep-daily 7
|
|
|
|
--keep-weekly 5
|
|
|
|
--keep-monthly 12
|
|
|
|
TZ: Europe/Copenhagen
|
2024-03-04 08:20:04 +00:00
|
|
|
POST_COMMANDS_FAILURE: /run/libexec/failure.sh
|
2024-03-05 08:55:04 +00:00
|
|
|
POST_COMMANDS_SUCCESS: /run/libexec/success.sh
|
2023-09-30 14:25:06 +00:00
|
|
|
volumes:
|
|
|
|
- "./ssh:/run/secrets/.ssh:ro"
|
2024-03-03 20:17:48 +00:00
|
|
|
- "./scripts:/run/libexec:ro"
|
2023-09-30 14:25:06 +00:00
|
|
|
- "/docker-volumes:/mnt/volumes:ro"
|
2024-03-03 20:17:48 +00:00
|
|
|
networks:
|
|
|
|
- postfix
|
2023-09-30 14:25:06 +00:00
|
|
|
|
|
|
|
prune:
|
|
|
|
image: mazzolino/restic:{{ services.restic.version }}
|
|
|
|
environment:
|
|
|
|
RUN_ON_STARTUP: false
|
|
|
|
PRUNE_CRON: "0 30 4 * * *"
|
2024-03-06 12:38:46 +00:00
|
|
|
RESTIC_REPOSITORY: sftp:{{ services.restic.remote_user }}@{{ services.restic.remote_domain }}:{{ services.restic.repository }}
|
2023-09-30 14:25:06 +00:00
|
|
|
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
|
|
|
|
TZ: Europe/copenhagen
|
|
|
|
volumes:
|
|
|
|
- "./ssh:/run/secrets/.ssh:ro"
|
2024-03-03 20:17:48 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
postfix:
|
|
|
|
external: true
|