Why is nextcloud so hard to upgrade?

occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
Updating <oauth2> ...
Updated <oauth2> to 1.14.0
Updating <password_policy> ...
Updated <password_policy> to 1.16.0
Updating <photos> ...
Updated <photos> to 2.2.0
Updating <files> ...
Updated <files> to 1.21.1
Updating <activity> ...
Updated <activity> to 2.18.0
Updating <circles> ...
Updated <circles> to 26.0.0
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.9.0
Updating <dav> ...
Fix broken values of calendar objects

 Done
    0/0 [->--------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [----->----------------------]   0%
Updated <dav> to 1.25.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.18.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.16.0
Updating <files_versions> ...
Updated <files_versions> to 1.19.1
Updating <sharebymail> ...
Updated <sharebymail> to 1.16.0
Updating <workflowengine> ...
Updated <workflowengine> to 2.8.0
Updating <comments> ...
Updated <comments> to 1.16.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.15.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.15.0
Updating <notifications> ...
Updated <notifications> to 2.14.0
Updating <systemtags> ...
Updated <systemtags> to 1.16.0
Updating <theming> ...
Migrate old user accessibility config
 Done
    4/4 [============================] 100%
Updated <theming> to 2.1.1
Updating <bruteforcesettings> ...
Updated <bruteforcesettings> to 2.6.0
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.7.0
Updating <dashboard> ...
Updated <dashboard> to 7.6.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.16.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.7.0
Updating <files_rightclick> ...
Updated <files_rightclick> to 1.5.0
Updating <logreader> ...
Updated <logreader> to 2.11.0
Updating <privacy> ...
Updated <privacy> to 1.10.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.16.0
Updating <recommendations> ...
Updated <recommendations> to 1.5.0
Updating <related_resources> ...
Updated <related_resources> to 1.1.0-alpha1
Updating <serverinfo> ...
Updated <serverinfo> to 1.16.0
Updating <settings> ...
Updated <settings> to 1.8.0
Updating <support> ...
Updated <support> to 1.9.0
Updating <survey_client> ...
Updated <survey_client> to 1.14.0
Updating <text> ...
Updated <text> to 3.7.2
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.15.0
Updating <twofactor_totp> ...
Updated <twofactor_totp> to 8.0.0
Updating <updatenotification> ...
Updated <updatenotification> to 1.16.0
Updating <user_status> ...
Updated <user_status> to 1.6.0
Updating <viewer> ...
Updated <viewer> to 1.10.0
Updating <weather_status> ...
Updated <weather_status> to 1.6.0
Update app analytics from App Store
Update app announcementcenter from App Store
Add read permissions for existing announcements
 Done
    0/0 [------------->--------------]   0%
Update app bookmarks from App Store
Update app calendar from App Store
Update app cospend from App Store
Update app files_linkeditor from App Store
Update app files_versions_s3 from App Store
Update app forms from App Store
Update app integration_github from App Store
Update app integration_google from App Store
Update app integration_jira from App Store
Update app integration_onedrive from App Store
Update app memories from App Store
<strong>Repair warning: Failed to create filecache trigger (compatibility mode will be used): An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe </strong>log_bin_trust_function_creators variable)
Update app related_resources from App Store
Update app timemanager from App Store
Starting code integrity check...
Finished code integrity check
Update successful
Maintenance mode is kept active
Resetting log level
Operating System: Linux 6.6.78-Unraid x86_64

CPU: AMD Ryzen 9 5950X 16-Core Processor (32 cores)

Memory: 125.73 GB

Server time: Sat May 3 01:23:22 UTC 2025

Uptime: 6 days, 0 hours, 26 minutes, 50 seconds

Temperature
Load
Load average: 13.01171875 (last minute)

Memory
    RAM: Total: 125.7 GB/Current usage: 16 GB

    SWAP: Total: 0 B/Current usage: 0 B

Disk
loop2
Mount: /
Filesystem: btrfs
Size: 244.55 GB
Available: 61.12 GB
Used: 76% (183.43 GB)
shfs
Mount: /data
Filesystem: fuse.shfs
Size: 931.06 GB
Available: 326.06 GB
Used: 65% (605.00 GB)
You will get a notification once one of your disks is nearly full.
Files: 140180

Storages: 5

Free Space: 326.1 GB

Network
Hostname: fe437e128030
DNS: 192.168.50.2
Gateway:
lo
Status: up
Speed: unknown (Duplex: unknown)
IPv4: 127.0.0.1
IPv6: ::1
tunl0
Status: down
Speed: unknown (Duplex: unknown)
MAC: 00:00:00:00
IPv4:
IPv6:
eth0
Status: up
Speed: 10 Gbps (Duplex: full)
MAC: 02:42:ac:11:00:1f
IPv4: 172.17.0.31
IPv6:
Active users
Total users: 4
24 hours: 1
1 hour: 1
5 mins: 1
Shares
Users: 1
PHP
Version: 8.1.16

Memory limit: 512 MB

Max execution time: 3600

Upload max size: 1 GB

Extensions: Core, date, libxml, pcre, zlib, filter, hash, json, readline, Reflection, SPL, session, cgi-fcgi, bcmath, bz2, ctype, curl, dom, fileinfo, ftp, gd, gmp, iconv, standard, intl, ldap, mbstring, openssl, pcntl, PDO, pgsql, posix, imap, SimpleXML, sodium, sqlite3, xml, xmlwriter, zip, exif, mysqlnd, pdo_pgsql, pdo_sqlite, Phar, xmlreader, pdo_mysql, apcu, igbinary, redis, memcached, imagick, mcrypt, smbclient, libsmbclient, Zend OPcache

Database
Type: mysql

Version: 8.0.29

Size: 197.8 MB

External monitoring tool
You can connect an external monitoring tool by using this end point:

https://earnhardt-nextcloud.duckdns.org/ocs/v2.php/apps/serverinfo/api/v1/info
Appending "?format=json" at the end of the URL gives you the result in JSON.

To use an access token, please generate one then set it using the following command:

occ config:app:set serverinfo token --value yourtoken
Then pass the token with the "NC-Token" header when querying the above URL.
root@fe437e128030:/config/www/nextcloud/apps/oauth2/lib/Migration# occ maintenance:mode --on
Maintenance mode enabled
root@fe437e128030:/config/www/nextcloud/apps/oauth2/lib/Migration# occ db:convert-filecache-bigint
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
Following columns will be updated:

* file_metadata.id

This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n] y
root@fe437e128030:/config/www/nextcloud/apps/oauth2/lib/Migration# occ maintenance:mode --off
Maintenance mode disabled
root@fe437e128030:/config/www/nextcloud/apps/oauth2/lib/Migration# occ db:convert-filecache-bigint
All tables already up to date!
root@581a0c17b09d:/# occ app:update --all
deck new version available: 1.13.6
deck updated
files_accesscontrol new version available: 1.19.1
files_accesscontrol updated
external new version available: 5.4.1
external updated
files_fulltextsearch new version available: 29.0.2
files_fulltextsearch updated
files_automatedtagging new version available: 1.19.0
files_automatedtagging updated
fulltextsearch new version available: 29.0.2
fulltextsearch updated
fulltextsearch_elasticsearch new version available: 29.0.2
fulltextsearch_elasticsearch updated
root@581a0c17b09d:/# occ status
  - installed: true
  - version: 29.0.12.2
  - versionstring: 29.0.12
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false
root@581a0c17b09d:/# occ upgrade
Nextcloud is already latest version
occ app:update --all
files_accesscontrol new version available: 1.20.1
files_accesscontrol updated
deck new version available: 1.14.5
deck updated
files_fulltextsearch new version available: 31.0.0
files_fulltextsearch updated
files_automatedtagging new version available: 1.20.0
files_automatedtagging updated
fulltextsearch new version available: 30.0.1
fulltextsearch updated
fulltextsearch_elasticsearch new version available: 30.0.1
fulltextsearch_elasticsearch updated
files_downloadactivity new version available: 1.18.1
files_downloadactivity updated
external new version available: 5.5.2
external updated
root@fc2b975c7d34:/# occ status
  - installed: true
  - version: 30.0.10.1
  - versionstring: 30.0.10
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false
root@fc2b975c7d34:/# occ upgrade
Nextcloud is already latest version
 occ setupchecks
        dav:
                ✓ DAV system address book: No outstanding DAV system address book sync.
        network:
                ✓ WebDAV endpoint: Your web server is properly set up to allow file synchronization over WebDAV.
                ✓ Data directory protected
                ✓ Internet connectivity
                ✓ JavaScript source map support
                ✓ JavaScript modules support
                ✓ OCS provider resolving
                ✓ .well-known URLs: Your server is correctly configured to serve `.well-known` URLs.
                ✓ Font file loading
        system:
                ✓ Files reminder: This files_reminder can work properly.
                ℹ Errors in the log: 1 warning in the logs since April 26, 2025, 6:15:00 PM
                ✓ Allowed admin IP ranges: Admin IP filtering isn't applied.
                ℹ Brute-force Throttle: Your remote address could not be determined.
                ✓ Cron errors: The last cron job ran without errors.
                ✓ Cron last run: Last background job execution ran 4 minutes ago.
                ⚠ Debug mode: This instance is running in debug mode. Only enable this for local development and not in production environments.
                ✓ File locking
                ⚠ Maintenance window start: Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks.
                ✓ Memcache: Configured
                ⚠ Mimetype migrations available: One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations.
                ✓ Architecture: 64-bit
                ✓ Temporary space available: Temporary directory is correctly configured:
- 58.1 GiB available in /tmp (PHP temporary directory)
                ✓ Push service: Free push service
        notifications:
                ✓ Push notifications - Fair use policy
        security:
                ✓ App directories owner: App directories have the correct owner "abc"
                ✓ Old administration imported certificates
                ✓ Code integrity: No altered files
                ℹ Forwarded for headers: Your remote address could not be determined.
                ✓ HTTPS access and URLs: You are accessing your instance over a secure connection, and your instance is generating secure URLs.
                ✓ Old server-side-encryption: Disabled
                ✓ PHP version: You are currently running PHP 8.3.19.
                ✓ Random generator: Secure
                ⚠ HTTP headers: Some headers are not set correctly on your instance
- The `Strict-Transport-Security` HTTP header is not set (should be at least `15552000` seconds). For enhanced security, it is recommended to enable HSTS.

        database:
                ✓ Database missing columns: None
                ⚠ Database missing indices: Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them.
Missing indices:
 "dav_shares_resourceid_type" in table "dav_shares", 
 "dav_shares_resourceid_access" in table "dav_shares", 
 "oc_npushhash_di" in table "notifications_pushhash", 
 "textstep_session" in table "text_steps", 
 "fs_name_hash" in table "filecache", 
 "schedulobj_lastmodified_idx" in table "schedulingobjects", 
 "mounts_user_root_path_index" in table "mounts", 
 "systag_by_tagid" in table "systemtag_object_mapping", 
 "systag_by_objectid" in table "systemtag_object_mapping"
                ✓ Database missing primary keys: None
                ✓ Database pending bigint migrations: None
                ✓ MySQL Unicode support: MySQL is used as database and does support 4-byte characters
                ✓ Scheduling objects table size: Scheduling objects table size is within acceptable range.
                ✓ Database version: 8.0.29
                ✓ Database transaction isolation level: Read committed
        config:
                ✓ Default phone region: US
                ✓ Email test: Email test was successfully sent
                ✓ Overwrite CLI URL: The "overwrite.cli.url" option in your config.php is set to "https://earnhardt-nextcloud.duckdns.org" which is a correct URL. Suggested URL is "http://localhost".
                ✓ Configuration file access rights: Nextcloud configuration file is writable
        php:
                ✓ PHP default charset: UTF-8
                ✓ PHP set_time_limit: The function is available.
                ✓ Freetype: Supported
                ✓ PHP getenv
                ✓ PHP memory limit: ?
                ✓ PHP modules
                ✓ PHP opcache: Checking from CLI, OPcache checks have been skipped.
                ✓ PHP "output_buffering" option: Disabled
                ✓ PHP Imagick module
root@fc2b975c7d34:/# occ db:add-missing-indices
Adding additional dav_shares_resourceid_type index to the oc_dav_shares table, this can take some time...
oc_dav_shares table updated successfully.
Adding additional dav_shares_resourceid_access index to the oc_dav_shares table, this can take some time...
oc_dav_shares table updated successfully.
Adding additional oc_npushhash_di index to the oc_notifications_pushhash table, this can take some time...
oc_notifications_pushhash table updated successfully.
Adding additional textstep_session index to the oc_text_steps table, this can take some time...
oc_text_steps table updated successfully.
Adding additional fs_name_hash index to the oc_filecache table, this can take some time...
oc_filecache table updated successfully.
Adding additional schedulobj_lastmodified_idx index to the oc_schedulingobjects table, this can take some time...
oc_schedulingobjects table updated successfully.
Adding additional mounts_user_root_path_index index to the oc_mounts table, this can take some time...
oc_mounts table updated successfully.
Adding additional systag_by_tagid index to the oc_systemtag_object_mapping table, this can take some time...
oc_systemtag_object_mapping table updated successfully.
Adding additional systag_by_objectid index to the oc_systemtag_object_mapping table, this can take some time...
oc_systemtag_object_mapping table updated successfully.

Leave a Reply