Cannot manually upgrade from 11.0.3


#1

Hi,

we cannot upgrade our nextcloud instance from NC 11.0.3 to 12.0.0. We re still getting the known error message: Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed

Everything was deleted except for the config file

currect version: ‘version’ => ‘11.0.3.2’,

php Version: 7.0.19
apache: 2.4
OS: Debian 8


Updates between multiple major versions and downgrades are unsupported
[Solved] Automatic Update from 12.0.3 to 12.0.6 failed
#2

Same for me, unable to upgrade in any way, I get the same major versions error.

What I tried so far:
Uninstalling nextcloud using package manager, and deleting the rest of the install folder afterwards. Then I installed NC12 using the package manager and imported my config.php and data directory. Also imported the database as instructed in the documentation for a restore. Unfortunately the problem persists. There is not even a way I can get out of maintenance mode. The site always shows that it wants to upgrade.
I also tried to do as instructed here but without success. The problem is exactly the same.
Finally, I also tried to modify the version number in my config.php, but it did not change anything either.
The occ command gives the same error and stops the upgrade procedure.
Before upgrading, I always make sure to set the right permissions for upgrading: chown -R ${htuser}:${htgroup} ${ocpath}

Any help would be greatly appreciated!

I am on archlinux armv7, everything up-to-date.

Here the last stuff from my updater.log in the data folder.


#3

Same here, no update notification or anything else in the admin panel.


#4

Did anyone manage to do a complete uninstallation and reinstallation? I failed trying to do so. Either way, I am always stuck at the update page…
I hope there is going to be some sort of support for us. I kind of need my instance back up soon…


#5

Ok guys, since we did not get any support, I tried stuff on my own and figured out a very dirty solution.
Remove nextcloud with package manager,
remove the nextcloud folder on the server (keep backups somewhere else),
install nextcoud 12 with package manager,
put your old config file and data (with DB, I was using sqlite which is easy: just put the owncloud.db file back in the data folder with the rest of your data) back in place. You might need to change the version number to 12.0.0 in your config file, but I don’t think so.

now the dirty stuff:
In the nextcloud install directory find and modify the Updater.php (in lib/private/) to “return true” where it would check if an update is possible:
change line 210-212, which look like this:
return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) && (version_compare($oldVersion, $newVersion, '<=') || $this->config->getSystemValue('debug', false));
to just
return true;
and you do the same for line 216-217, which look like this:
return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) || isset($allowedPreviousVersions[$currentVendor][$oldVersion]);
After that, the update should just do its thing.
Remember to check the file permissions before starting the update!
When the update is done, put the original Updater.php back in place and give it the original permissions and ownership.

Hope that’s going to help some of you to update and get your instance back up again. For me it was a pain to have the instance broken for 3 weeks since I need the sync for work…


Error 500 after migration
Migrating from ownCloud to Nextcloud
#6

thanks mate - this helped a lot!
Easy to do and worked as expected!

Cheers,
Sven