vm icon indicating copy to clipboard operation
vm copied to clipboard

update.sh does not update from v31 to v32

Open flostyen opened this issue 8 months ago • 5 comments

Steps To Reproduce

  1. Nextcloud v31 is running
  2. Starting update.sh
  3. "Cant be updated, because two Major-Updates v31 to v33 is not supported
  4. Starting update.sh minor
  5. "Nothing to update", stays on Nextcloud v31

How can I update to v32 using the update.sh script? :-)

Expected Result

An option to update to neither the lastest v33 nor the current v31, but instead to the next version.

Actual Result

Stays on v31

Screenshots, Videos, or Pastebins

Image

Additional Context

No response

Build Version

31.0.14

Environment

By downloading the VM

Environment Details

  • Ubuntu 22.04
  • php 8.4

flostyen avatar Mar 05 '26 20:03 flostyen

The same issue here

vjatsjeslav avatar Mar 13 '26 22:03 vjatsjeslav

I've had today the same issue, and by looking around I found this https://github.com/nextcloud/vm/issues/2516#issuecomment-1636414359 which I then tried putting a v32 version to upgrade to, but at least from my tests the script output kept mentioning I was trying to upgrade from v31 directly to v33.

By tinkering a bit with the scripts I found anyway that the following steps worked fine for me:

  1. Please make a backup before doing any of this even if you should have already done it at this point
  2. Via sudo bash /var/scripts/menu.sh make sure you have the latest version of v31 (31.0.14 at the time I'm writing, check here)
  3. Set the latest v32 version in the file nextmajor.version with echo "32.0.6" > /tmp/nextmajor.version
  4. Bypass the menu.sh script and launch directly sudo bash /var/script/update.sh major This will give an error (the same "syntax error" visible in the comment I linked) but the v32 will be installed anyway, I've not figured out why exactly
  5. Check if with v32 everything is fine with Nextcloud, then launch again menu.sh and it should upgrade correctly from v32 to v33

This might not be acceptable as a stable solution, but at least for me it worked. I believe there is an issue in how the version number is read inside the nextmajor.version even if coudn't figure it out what exactly.

DrOliver94 avatar Mar 20 '26 22:03 DrOliver94

I've had today the same issue, and by looking around I found this #2516 (comment) which I then tried putting a v32 version to upgrade to, but at least from my tests the script output kept mentioning I was trying to upgrade from v31 directly to v33.

By tinkering a bit with the scripts I found anyway that the following steps worked fine for me:

1. Please make a backup before doing any of this even if you should have already done it at this point

2. Via `sudo bash /var/scripts/menu.sh` make sure you have the latest version of v31 (31.0.14 at the time I'm writing, check [here](https://nextcloud.com/changelog-unsupported/))

3. Set the latest v32 version in the file nextmajor.version with `echo "32.0.6" > /tmp/nextmajor.version`

4. Bypass the `menu.sh` script and launch directly `sudo bash /var/script/update.sh major`
   This will give an error (the same "syntax error" visible in the comment I linked) but the v32 will be installed anyway, I've not figured out why exactly

5. Check if with v32 everything is fine with Nextcloud, then launch again `menu.sh` and it should upgrade correctly from v32 to v33

This might not be acceptable as a stable solution, but at least for me it worked. I believe there is an issue in how the version number is read inside the nextmajor.version even if coudn't figure it out what exactly.

Awesome, that worked :-)

However it still feels like there should be a way to update to the next major release instead of an error, that updating 2 major version is not supported.

flostyen avatar Mar 25 '26 20:03 flostyen

Just heads up.

Everything in the VM happens for a reason. That upgrades between major versions doesn't happen automatically is a sanity feature. That upgrades doesn't apply to PHP when Nextcloud requires a higher version - the same, since it will probably bork your server.

Doing the above is on your own risk.

Since the pop up is expected behavior, I'm closing this.

enoch85 avatar Apr 13 '26 18:04 enoch85

Just heads up.

Everything in the VM happens for a reason. That upgrades between major versions doesn't happen automatically is a sanity feature. That upgrades doesn't apply to PHP when Nextcloud requires a higher version - the same, since it will probably bork your server.

Doing the above is on your own risk.

Since the pop up is expected behavior, I'm closing this.

Well but there should be a way, to update only one major update, instead of just an abort that two majors are not a good idea, right? @enoch85 :-)

fdocksteyn avatar Apr 14 '26 10:04 fdocksteyn