I'm stuck on 26 from 24. I cannot downgrade or update! Please help

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 24.0.12.1 → 26.0.3.2
Operating system and version (eg, Ubuntu 20.04): Docker Apache Image
Apache or nginx version (eg, Apache 2.4.25): Docker Apache Image
PHP version (eg, 7.4): Docker Apache Image

The issue you are facing:
I updated to 26 using the stable tag but I got the error Exception: Updates between multiple major versions and downgrades are unsupported.

I then tried to go back to version 24 but I’m getting the error Can't start Nextcloud because the version of the data (26.0.3.2) is higher than the docker image version (24.0.12.1) and downgrading is not supported. Are you sure you have pulled the newest image version?

Is it possible for me to change the version of my database back to 24? I’m not sure 26 even updated anything.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Be on version 24
  2. Try to update to version 26
  3. Notice update will not be possible
  4. Notice downgraded doesn’t work either
<?php
$CONFIG = array (
  'datadirectory' => '/var/www/html/data',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => 'xxxxxx',
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxxx',
  'overwriteprotocol' => 'https',
  'trusted_domains' => 
  array (
    0 => 'xxxxxt',
  ),
  'trusted_proxies' => 
  array (
    0 => 'xxxxxx',
  ),
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'overwrite.cli.url' => 'https://xxxxx.xxxx',
  'check_for_working_wellknown_setup' => false,
  'dbtype' => 'mysql',
  'version' => '24.0.12.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'mail_from_address' => 'postmaster',
  'logtimezone' => 'Etc/UTC',
  'logdateformat' => 'Y-m-d H:i:s',
  ...
  'default_phone_region' => 'US',
  'loglevel' => 0,
  'maintenance' => true,
  'theme' => '',
  'updater.release.channel' => 'stable',
  'app_install_overwrite' => 
  array (
    0 => 'spreed',
    1 => 'twofactor_totp',
  ),
);

short help: try restoring your latest backup.

I ended up restoring my database files and root nextcloud files from a ZFS snapshot. I don’t know how I would have recovered without the snapshots or a backup.

I think this is a bug for Nextcloud. In my opinion, trying to upgrade two versions ahead should not put Nextcloud into a state where the user cannot go back to the previous version.

I tried to use this blog as a way to get back to my old version but it didn’t work for me.

it’s not NC’s fault as they tell from the very beginning on at every corner that you can’t skip any major version while updating.

so the common way would have been 24 → 25 → 26. Skipping major versions always end up in a total desaster, I’m afraid.

I didn’t intend to skip a release. I was on the docker tag 24 and I changed it to stable assuming the latest stable release was 25. To my surprise 26 was the latest stable.