faircloud upgrade procedure
This is an internal documentation for fairkom sysadmins. We have to upgrade nextcloud every few months.
- announce maintenance with Announcement app
- in /var/www/nextcloud/config/config.php set
'maintenance' => true,
- do a manual DB backup
- set 'maintenance' => false,
- as nextcloud admin we now run upgrade to the latest minor version in the web interface
-
Continue with web based updater
should be fine with minor updates - this usually also updates all apps, and there is no way to get back in app versions
- check if all apps are working
- continue with upgrading to next nextcloud major version with
sudo -u www-data php occ upgrade
- some repair jobs may take quite long #111 (comment 40870)
- check admin settings oevrview page
- likely you need to do a
sudo -u www-data php occ db:add-missing-indices
In case we need to continue completely manually, we also can change the Alias to maintenance in /etc/apache2/sites-available/nextcloud.conf
Problemlösung falls das Backup des Installers scheitert
Ist passiert am 22.06.2020 beim Versuch 16.x upzudaten. Das Backup hängt.
- Zip Datei der genauen Version holen
- Zip Datei woanders auspacken (/tmp) umbenennen in nextcloud_new, chown -R
- Mv von nextcloud_new direkt neben /var/www/nextcloud
- mit diff herausfinden, welche zusätzlichen Apps kopiert werden müssen
-
diff nextcloud/apps/ nextcloud_new/apps/|grep 'Only in nextcloud/apps/' | cut -d ' ' -f 4 > missing-apps
- diese Apps kopieren
-
cat missing-apps | while read line; do cp -a nextcloud/apps/$line nextcloud_new/apps/;done
- Config Ordner kopieren
- Datenbankdump ziehen
mv nextcloud nextcloud_bak && mv nextcloud_new/ nextcloud
sudo -u www-data php ./occ upgrade
-
sudo -u www-data php ./occ maintenance:repair
(war in diesem Fall mal wieder nötig)
In diesem Fall war außerdem nötig:
sudo -u www-data php ./occ db:convert-filecache-bigint
Etwas Off-Topic hier, aber ganz wichtig in config.php:
/**
* The allowed maximum memory in KiB to be used by the algorithm for computing a
* hash. The smallest possible value is 8. Values that undershoot the minimum
* will be ignored in favor of the default.
*/
'hashingMemoryCost' => 65536,
/**
* The allowed maximum time in seconds that can be used by the algorithm for
* computing a hash. The value must be an integer, and the minimum value is 1.
* Values that undershoot the minimum will be ignored in favor of the default.
*/
'hashingTimeCost' => 4,
Als Erinnerung: https://github.com/nextcloud/server/issues/17241
'hashingMemoryCost' => 2048,
'hashingTimeCost' => 2,
Problemlösung falls das Backup (oder ein anderer Zwischenschritt) hängt:
rm /mnt/storagebox/faircloud_sshfs/updater-52619b9bb6dfb/.step
occ command line tool
sudo -u www-data php ./occ list
Alle Apps updaten
sudo -u www-data php ./occ app:update --all
Apps enablen
sudo -u www-data php occ app:enable forms
Viele auf einmal enablen:
cat ../missing-apps | while read line; do sudo -u www-data php occ app:enable $line;sleep 1;done;
Das neue default notes readme Dings kann man abdrehen
occ config:app:set text workspace_available --value=0