[CLOUD] Add auto-backup
This commit is contained in:
parent
27c82e21bc
commit
c925c6793e
2 changed files with 30 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue