Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • nextcloud nextcloud
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • hosting
  • nextcloudnextcloud
  • Wiki
  • Upgrade procedure

Last edited by Roland Alton Feb 07, 2022
Page history

Upgrade procedure

faircloud upgrade procedure

This is an internal documentation for fairkom sysadmins. We have to upgrade nextcloud every few months.

  1. announce maintenance with Announcement app
  2. in /var/www/nextcloud/config/config.php set 'maintenance' => true,
  3. do a manual DB backup
  4. set 'maintenance' => false,
  5. as nextcloud admin we now run upgrade to the latest minor version in the web interface
  6. Continue with web based updater should be fine with minor updates
  7. this usually also updates all apps, and there is no way to get back in app versions
  8. check if all apps are working
  9. continue with upgrading to next nextcloud major version with sudo -u www-data php occ upgrade
  10. some repair jobs may take quite long #111 (comment 40870)
  11. check admin settings oevrview page
  12. 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

Siehe auch https://help.nextcloud.com/t/i-want-to-hide-the-add-notes-field-at-the-top-of-the-file-list-on-nc18/68574

occ config:app:set text workspace_available --value=0

Clone repository
  • Circles
  • Deleting Users
  • Upgrade procedure
  • Versioning and Backup
  • Home

gitlab project and software management by fairkom.eu - more open source web apps at fairapps.net