1
0
Fork 0

[CLOUD] Add auto-backup

This commit is contained in:
Florian RICHER 2023-05-20 19:16:13 +02:00
parent 27c82e21bc
commit c925c6793e
2 changed files with 30 additions and 0 deletions

View file

@ -2,6 +2,10 @@
# Global configuration
server:
domain: mrdev023.test
backup:
folder: /backup
cron_expression: "0 2 * * *"
retention_days: 7
acme:
email: florian.richer.97@outlook.com
debug: true

View file

@ -58,6 +58,32 @@ services:
- POSTGRES_HOST=db
- OVERWRITEPROTOCOL=https
backup_nextcloud:
image: offen/docker-volume-backup:latest
restart: always
environment:
BACKUP_CRON_EXPRESSION: "{{ server.backup.cron_expression }}"
BACKUP_FILENAME: "%Y-%m-%d-nextcloud.tar.gz"
BACKUP_LATEST_SYMLINK: nextcloud.latest.tar.gz
BACKUP_EXCLUDE_REGEXP: "\\.log$$"
BACKUP_RETENTION_DAYS: "{{ server.backup.retention_days }}"
volumes:
- nextcloud:/backup:ro
- {{ server.backup.folder }}/cloud:/archive
backup_db:
image: offen/docker-volume-backup:latest
restart: always
environment:
BACKUP_CRON_EXPRESSION: "{{ server.backup.cron_expression }}"
BACKUP_FILENAME: "%Y-%m-%d-db.tar.gz"
BACKUP_LATEST_SYMLINK: db.latest.tar.gz
BACKUP_EXCLUDE_REGEXP: "\\.log$$"
BACKUP_RETENTION_DAYS: "{{ server.backup.retention_days }}"
volumes:
- db:/backup:ro
- {{ server.backup.folder }}/cloud:/archive
volumes:
nextcloud:
db: