From c58b04533c26802554dfa7334840f60fe9ee10c4 Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 30 Jun 2020 06:28:49 -0500 Subject: [PATCH] Disable setting maintenance mode on Nextcloud backups Risky move! --- roles/nextcloud/templates/backup.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/roles/nextcloud/templates/backup.sh b/roles/nextcloud/templates/backup.sh index d9bfe85..4e7bb2a 100644 --- a/roles/nextcloud/templates/backup.sh +++ b/roles/nextcloud/templates/backup.sh @@ -43,9 +43,6 @@ if (( currentbackupcount >= retention * 3 )); then fi # WE MAKE BACKUP NOW SERGEI if cd "{{ nextcloud_webroot }}"; then - log "Enabling maintenance mode" - sudo -u www-data ./occ maintenance:mode --on > /dev/null 2>&1 - trap 'sudo -u www-data ./occ maintenance:mode --off' EXIT date="$(date -Iseconds)" log "Creating data backup" tar czhf "$OUTDIR/{{ nextcloud_url }}-$date-data.tar.gz" "/var/nextcloud" --exclude "/var/nextcloud/*/files_trashbin" @@ -53,9 +50,6 @@ if cd "{{ nextcloud_webroot }}"; then tar czf "$OUTDIR/{{ nextcloud_url }}-$date-webroot.tar.gz" "{{ nextcloud_webroot }}" log "Creating DB backup" mysqldump nextcloud --single-transaction | gzip > "$OUTDIR/{{ nextcloud_url }}-$date-db.sql.gz" - log "Unsetting maintenance mode" - sudo -u www-data ./occ maintenance:mode --off > /dev/null 2>&1 - trap : EXIT else log "Could not change directory: $OUTDIR" return 3