Upgrade from V21 to V32

But you will have to go that way. There is no alternative, among other things, because the database migration steps must be processed successively.

Look here for explanation. Quote:

Nextcloud must be upgraded step by step:

  • Before you can upgrade to the next major release, you need to upgrade to the latest point release of your current major version.
  • Then run the upgrade again to upgrade to the next major release’s latest point release.
  • You cannot skip major releases. Please re-run the upgrade until you have reached the highest available (or applicable) release.
  • Example: 18.0.5 → 18.0.11 → 19.0.5 → 20.0.2

Wait for background migrations to finish after major upgrades. After upgrading to a new major version, some migrations are scheduled to run as a background job. If you plan to upgrade directly to another major version (e.g. 24 → 25 → 26) you need to make sure these migrations were executed before starting the next upgrade. To do so you should run the cron.php file 2-3 times, for example:

$ sudo -E -u www-data php -f /var/www/nextcloud/cron.php

You will need an “intermediate” debian (at least 11, bullseye, since 9, stretch, is obsolete since three years and 5 months already!)
In that intermediate debian, you can switch the php versions successively as supported by the different nextcloud versions.

You can do the php version switches with the php-updater ← script.

But you can start directly with debian 13 (trixie), the current stable and install php8.0 (a piece of cake with the php-updater script). Then you can simply do the complete migrations steps on the future actual system.


h.t.h.


ernolf