docker icon indicating copy to clipboard operation
docker copied to clipboard

[Bug]: Upgrade dilemma 25 to 27

Open xeruf opened this issue 2 years ago • 3 comments

⚠️ This issue respects the following points: ⚠️

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

xeruf avatar Oct 03 '23 16:10 xeruf

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.

wetneb avatar Nov 25 '23 14:11 wetneb

  1. backup everything
  2. remove Nextcloud files in var/www/html except apps, config, data etc. (see https://github.com/nextcloud/docker/blob/master/upgrade.exclude)
  3. 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

J0WI avatar Mar 04 '24 23:03 J0WI

IMHO this comment resolves the problem at 99% success rate

isdnfan avatar Apr 25 '24 20:04 isdnfan