[Bug]: Upgrade dilemma 25 to 27
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
I am trying to upgrade from Nextcloud 25 to 27, accidentally ending up with a skipped version in my kubernetes cluster.
I tried to run occ upgrade in version 27 and got:
Exception: Updates between multiple major versions and downgrades are unsupported. Update failed
Then I tried to go back to Nextcloud 26, but that failed too:
Can't start Nextcloud because the version of the data (27.0.2.1) is higher than the docker image version (26.0.2.1) and downgrading is not supported. Are you sure you have pulled the newest image version?
So I cannot run at 26 because the data is supposedly at 27 but I cannot upgrade it to 27 because the data is supposedly at 25. What the heck?
Steps to reproduce
good question
Expected behavior
Either the data is at 25 or 27, not both at once?
Installation method
Stackspin Kubernetes Cluster
I have recently made a change which intended to address exactly this issue (https://github.com/nextcloud/docker/pull/2018). I wonder if this change was already included in the Docker image of NextCloud 27 that you used. Can you tell us about the exact name of the Docker image you used, and when you pulled it?
For workarounds about how to restore your instance, see #1809, #1129, #616 and #617.
- backup everything
- remove Nextcloud files in
var/www/htmlexcept apps, config, data etc. (see https://github.com/nextcloud/docker/blob/master/upgrade.exclude) - run with Nextcloud 25/26 image again and do the upgrade
See https://github.com/nextcloud/docker/blob/master/docker-entrypoint.sh#L174-L180 to replace the Nextcloud files manually
IMHO this comment resolves the problem at 99% success rate