From b90568bcc57f6f6dc1a2f53d7dd67ec93ce7df0a Mon Sep 17 00:00:00 2001 From: "sdroid@pizarro.uber.space" Date: Sun, 23 Jan 2022 15:30:07 +0100 Subject: [PATCH] Added Nextcloud update script form Uberlab. --- bin/executable_nextcloud-update | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bin/executable_nextcloud-update diff --git a/bin/executable_nextcloud-update b/bin/executable_nextcloud-update new file mode 100644 index 0000000..8cd59e0 --- /dev/null +++ b/bin/executable_nextcloud-update @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +## Updater automatically works in maintenance:mode. +## Use the Uberspace backup system for files and database if you need to roll back. +## The Nextcloud updater creates backups only to safe base and app code data and config files +## so it takes ressources you might need for your productive data. +## Deactivate NC-updater Backups with --no-backup (works from 19.0.4, 18.0.10 and 17.0.10) +php ~/html/updater/updater.phar -vv --no-backup --no-interaction + +## re-enable maintenance mode for occ commands +php ~/html/occ maintenance:mode --on + +## database optimisations +## The following command works from Nextcloud 20. +## remove '#' so it is working +php ~/html/occ db:add-missing-primary-keys --no-interaction +## The following command works from Nextcloud 19. +## remove '#' so it is working +php ~/html/occ db:add-missing-columns --no-interaction +php ~/html/occ db:add-missing-indices --no-interaction +php ~/html/occ db:convert-filecache-bigint --no-interaction + +php ~/html/occ app:update --all +php ~/html/occ maintenance:mode --off +/usr/sbin/restorecon -R ~/html