I’ve migrated an instance of nextCloud 21.0.9.1 to a new server. There I try to upgrade it, but it fails at the first step.
$ php7.4 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
...
starting upgrade from 21.0.9.1 to 22.2.10.2
...
Exception: Updates between multiple major versions and downgrades are unsupported.
Any idea what I’m missing or how to work around this?
It didn’t help and resulted in even more db errors during the upgrade. I dropped all tables, re-imported the db and skipped those steps in the next attempt to get the upgrade working.
21 to 22? I’m running Nextcloud 29. Why are you running such an outdated and obsolete version?
And wwe is correct, this identical question gets asked all the time. You should read some of the previous responses. Or better yet, wipe and install a current version of Nexcloud.
I’m still having trouble with this instance. After the adjustments I made to the database (described in my last post) I was able to do the upgrade and it’s now at 28.0.5.
People can’t log in and I get tons of error messages because of missing fields. I have no idea what’s been done with that instance before. When it was assigned to me it identified itself as nextcloud version 21.0.9.1 and it was running without problems although it seems to me that the database was already damaged or at least missing a lot of fields (of course I still have a full backup of that state).
I’ve tried this in the initial state and at version 28:
I did not find any tool that would reliably fix the database structure.
I’ve started new from the backup I had of nextCloud 21.0.9.1.
I also did a clean dummy installation to have a reference database of nextcloud 21 and then exported the complete structure of each database to a single sql file and ran a diff comparison on them.
After fixing all the differences I was able to run occ maintenance:repair without errors.
After inserting the record (“core”, “vendor”, “nextcloud”) to table oc_appconfig, I did the upgrade to version 28 again.
I should have been suspicious about the contradictions in that statement:
I was able to get nextcloud up and running with the steps I’ve mentioned in the last post. Still a few of the users weren’t able to log in. At last I realised (far too late), that the database backup I was provided with, was outdated. I requested a fresh database dump from the previous maintainer. That solved all the issues.