Add automated DB backups for nextcloud
Will roll this out to everything else someday too!
This commit is contained in:
parent
55eca663a9
commit
ca3ed14973
2 changed files with 16 additions and 0 deletions
|
@ -12,6 +12,7 @@ services:
|
|||
- ./backups:/backups
|
||||
- /srv/nextcloud-data/data/:/source/nextcloud:ro
|
||||
- /opt/gitea/repos/repositories:/source/repositories:ro
|
||||
- /scratch/db-backups:/source/db-backups:ro
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
|
|
|
@ -33,6 +33,21 @@ services:
|
|||
- POSTGRES_PASSWORD=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
|
||||
db-backups:
|
||||
image: prodrigestivill/postgres-backup-local:12-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /scratch/db-backups:/backups
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- POSTGRES_PASSWORD=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_DB=nextcloud
|
||||
- BACKUP_KEEP_MONTHS=1
|
||||
- BACKUP_KEEP_WEEKS=1
|
||||
|
||||
redis:
|
||||
image: redis:5-alpine
|
||||
restart: unless-stopped
|
||||
|
|
Loading…
Reference in a new issue