Put Nextcloud in maintenance mode during backups
This commit is contained in:
parent
eb8db1725b
commit
7304bb18f5
|
@ -60,7 +60,8 @@ services:
|
||||||
sender_domains:
|
sender_domains:
|
||||||
- "{{ services.nextcloud.domain }}"
|
- "{{ services.nextcloud.domain }}"
|
||||||
|
|
||||||
backup_volumes:
|
restic_volumes:
|
||||||
|
- "/var/run/docker.sock:/var/run/docker.sock:rw"
|
||||||
- "{{ services.caddy.volume }}:/mnt/volumes/caddy:ro"
|
- "{{ services.caddy.volume }}:/mnt/volumes/caddy:ro"
|
||||||
- "{{ services.postfix.volume }}:/mnt/volumes/postfix:ro"
|
- "{{ services.postfix.volume }}:/mnt/volumes/postfix:ro"
|
||||||
- "{{ services.emby.volume }}:/mnt/volumes/emby:ro"
|
- "{{ services.emby.volume }}:/mnt/volumes/emby:ro"
|
||||||
|
|
|
@ -29,10 +29,14 @@
|
||||||
--keep-daily 7
|
--keep-daily 7
|
||||||
--keep-weekly 5
|
--keep-weekly 5
|
||||||
--keep-monthly 12
|
--keep-monthly 12
|
||||||
|
PRE_COMMANDS: |-
|
||||||
|
docker exec -u www-data nextcloud_app_1 php occ maintenance:mode --on
|
||||||
|
POST_COMMANDS_EXIT: |-
|
||||||
|
docker exec -u www-data nextcloud_app_1 php occ maintenance:mode --off
|
||||||
B2_ACCOUNT_ID: "{{ secrets.restic.b2.id }}"
|
B2_ACCOUNT_ID: "{{ secrets.restic.b2.id }}"
|
||||||
B2_ACCOUNT_KEY: "{{ secrets.restic.b2.key }}"
|
B2_ACCOUNT_KEY: "{{ secrets.restic.b2.key }}"
|
||||||
TZ: "{{ timezone }}"
|
TZ: "{{ timezone }}"
|
||||||
volumes: "{{ backup_volumes }}"
|
volumes: "{{ restic_volumes }}"
|
||||||
|
|
||||||
prune:
|
prune:
|
||||||
image: mazzolino/restic:{{ services.restic.version }}
|
image: mazzolino/restic:{{ services.restic.version }}
|
||||||
|
|
Reference in a new issue