Upgrading Nextcloud 29

I've been running nextcloud 28 for some time now. Mostly because the last time I tried to upgrade it was a nightmare and I had to restore a backup... lucky me I had one to restore.

Nextcloud documentation provides a few ways to update, one may even say a few too much. There should be a simpler path for upgrades.

To add into the mess none of them worked for me. The UI or command line didn't say there was any new update, the manual methods didn't work and a simple package upgrade broke the whole thing...

The result was that I procrastinated the task for some months until today.

While bored I found some information asserting that I should use the Alpine package manager to upgrade nextcloud, BUT the important piece was that a version specific package exists. So instead of upgrading nextcloud package I needed to remove it and install the nextcloud29 one.

apk del nextcloud
apk del nextcloud-*
apk add nextcloud29

Easy! other than occ doesn't work... Lucky me I can read sometimes and you also need to install occ package... it doesn't come bundled anymore.

apk add nextcloud29-occ
occ upgrade

Perfect, sure this will work now...

Wrong! Remember that nice del nextcloud-*? well.. I also need to install all those packages but for the 29 version.

At this point I though I would need to restore a backup and start over but lucky me I had the history of the deleted packages.

apk add  nextcloud29-admin_audit nextcloud29-comments nextcloud29-dashboard  nextcloud29-activity nextcloud29-circles nextcloud29-files_pdfviewer nextcloud29-logreader nextcloud29-password_policy nextcloud29-photos nextcloud29-privacy nextcloud29-recommendations nextcloud29-serverinfo nextcloud29-files_sharing nextcloud29-survey_client nextcloud29-text nextcloud29-doc nextcloud29-encryption nextcloud29-federation nextcloud29-files_external nextcloud29-files_trashbin nextcloud29-files_versions nextcloud29-initscript nextcloud29-mysql nextcloud29-notifications nextcloud29-sharebymail nextcloud29-support

Now for sure it works... wrong again, some php packages where missing.

apk add php83-pdo_mysql php83-pdo php83-mysqlnd php83-redis

Most of them where removed with the removal of the nextcloud package but the redis one was a new thing...

From here I started to have a few weird issues of "invalid key" or something like that on some "systemtags" apps and similars.

I decided to disable any app that was annoying me with that error. I'm sure this will not bite me in the ass in the future.

 occ app:disable systemtags
 occ app:disable user_status
 occ app:disable weather_status
 vim /etc/php83/php.ini 

I also took the chance to increase the memory limit since the occ command was complaining about it a lot.

Run occ upgrade like 4 more times. Got the recognizr app disabled for some reason and had to edit the config file to disable the manteince mode manually.

Run the upgrade twice more and tada! working!!

At some point I need to figure out the recognizr app and the apps that I had to disable manually. For now this is it.

I really HATE updating nextcloud each time. I like the product both file sync & photo directory but god damn.

Hopefully the next upgrade will be easier!