Not long ago we had some fun upgrading to NextCloud 29. Today I relized 31 is out!! times flies and hence we need to verify if the process has gotten easy or not.
For background, I'm using LXC with Alpine from the Proxmox Helper Scripts and something important to understand is that this way of installing NextCloud is not documented at all by nextcloud itself!
Recently, the packages from NextCloud changed the way to update which we learnt about upgrading to 29.
This time in theroy we should install nextcloud-30 and upgrade then repeat for 31 and done! sounds easy, let's see how it goes!
NextCloud 30
As said, this should be quick. Install the new apk, occ upgrade and done.
$ apk add nextcloud30
Executing nextcloud30-30.0.13-r0.post-install
* If you are upgrading to a versioned package (starts at v29.0.4-r1),
please do the following:
* Run "apk upgrade -a" a second time to complete the upgrade of all
nextcloud packages
* Run "occ upgrade" to finish upgrading your Nextcloud instance
* NOTE: since v29.0.4-r1 "occ" command is now in package "nextcloudNN-occ"
So we do as it says apk upgrade -a and then occ upgrade.
Immediately, we find our first problem. Some apps complain that they haven't been updated correctly. To fix this, I started disabling them and running the upgrade command again, which looks like this from my history:
901 occ app:disable activity
905 occ upgrade
906 occ app:disable circles
907 occ upgrade
908 occ app:disable comments
909 occ upgrade
910 occ app:disable dashboard
911 occ upgrade
912 occ app:disable federation
913 occ upgrade
914 occ app:disable files_downloadlimit
915 occ upgrade
916 occ app:disable files_pdfviewer
917 occ upgrade
918 occ app:disable files_sharing
919 occ upgrade
920 occ app:disable files_trashbin
921 occ upgrade
922 occ app:disable files_versions
923 occ upgrade
924 occ app:disable logreader
925 occ upgrade
926 occ app:disable notifications
927 occ upgrade
928 occ app:disable password_policy
929 occ upgrade
930 occ app:disable photos
931 occ upgrade
932 occ app:disable privacy
933 occ upgrade
934 occ app:disable recommendations
935 occ upgrade
936 occ app:disable serverinfo
937 occ upgrade
938 occ app:disable sharebymail
939 occ upgrade
940 occ app:disable support
941 occ upgrade
942 occ app:disable survey_client
943 occ upgrade
944 occ app:disable text
945 occ upgradePhew... it felt like I had to disable all apps from NextCloud.
Finally, I run the recommended steps from NextCloud documentation and get out of maintenance mode.
$ occ db:add-missing-columns
$ occ db:add-missing-indices
$ occ db:add-missing-primary-keys
$ occ maintenance:mode --offI check the UI admin view and run a repair because it's complaining about some mime types.
occ maintenance:repair --include-expensiveok... we are on Nextcloud Hub 9 (30.0.13) and running occ upgrade doesn't find any upgrade. Seems the first part was much easier than last time!
I noticed activity is not there anymore, which I like; now it goes directly into files.
Memories is not working, seems more related to shared folders not being shared anymore... Since I'll upgrade to 31, I made a note about this and moved on.
NextCloud 31
Encouraged by the 30 upgrade, we move on to 31.
$ apk add nextcloud31
$ apk upgrade -a
$ occ upgradeAnd... I have the exact same error as before, but with new apps:
$ 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
Turned on maintenance mode
Updating database schema
Updated database
UnexpectedValueException: The files of the app "app_api" were not correctly replaced before running the update
Update failedAt this point, I have to wonder... I am missing a step that is not documented anywhere? But oh well... with a huge sigh, I move on to disable any app that complains yet again.
And... a pleasant surprise! I only had to disable app_api!
$ occ db:add-missing-columns
$ occ db:add-missing-indices
$ occ db:add-missing-primary-keys
$ occ maintenance:mode --off
$ occ maintenance:repair --include-expensiveI do wonder why some of these commands are not already part of the upgrade.
At this point, I remember to check the release notes for breaking changes... 🤦♂️
Lucky me, no breaking changes that I care about.
Post Upgrade steps
I noticed the reason shared files and so on don't work is because I disabled those apps 😄, but I can't install them again because "no internet" error. This is quite weird since we do have a connection.. I can reach it from my PC & phone. So, time to dig.
This was a fun one that didn't end up as good. Run it down to idn_to_utf8 not working as expected. Found an issue in GitHub that mentioned rebooting nginx. Rebooted the whole container and now it works.
I couldn't update apps through occ , but I could enable the ones I wanted in the UI. Some didn't work, which I guess they are not yet ready for 31.
Overall, the experience was better. I spent more time than last time with the weird bug, but that was me wanting to fully understand it