1
0
Fork 0

[TRAEFIK] Add auto-backup

This commit is contained in:
Florian RICHER 2023-05-20 19:54:01 +02:00
parent 221b1f8b6a
commit e6b847344c

View file

@ -115,6 +115,33 @@ services:
volumes:
- ./config/dynamic_conf.yaml:/usr/local/apache2/htdocs/dynamic_conf.yaml
# BACKUP
backup_prometheus:
image: offen/docker-volume-backup:latest
restart: always
environment:
BACKUP_CRON_EXPRESSION: "{{ server.backup.cron_expression }}"
BACKUP_FILENAME: "{{ server.backup.filename_date_format }}-prometheus.tar.gz"
BACKUP_LATEST_SYMLINK: prometheus.latest.tar.gz
BACKUP_EXCLUDE_REGEXP: "\\.log$$"
BACKUP_RETENTION_DAYS: "{{ server.backup.retention_days }}"
volumes:
- prometheus:/backup:ro
- {{ server.backup.folder }}/traefik:/archive
backup_grafana:
image: offen/docker-volume-backup:latest
restart: always
environment:
BACKUP_CRON_EXPRESSION: "{{ server.backup.cron_expression }}"
BACKUP_FILENAME: "{{ server.backup.filename_date_format }}-grafana.tar.gz"
BACKUP_LATEST_SYMLINK: grafana.latest.tar.gz
BACKUP_EXCLUDE_REGEXP: "\\.log$$"
BACKUP_RETENTION_DAYS: "{{ server.backup.retention_days }}"
volumes:
- grafana:/backup:ro
- {{ server.backup.folder }}/traefik:/archive
networks:
providers:
internal: