Occ upgrade from 22.2.10 to Nextcloud 23.0.12 is failing

Version upgrade from 22.2.10 to Nextcloud 23.0.12 according to admin page possible creates the error
You may use your browser or the occ upgrade command to do the upgrade

/usr/local/php80/bin/php -c …/.user.ini occ upgrade

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed

Way is this?
it dons not make sence to me and I can also not find any clear instructions way this message appears on the Web
Thanks for the help

Can you clarify what you did immediately before trying to run occ upgrade on the command line? That is, how did you deploy the code update? Or, better yet, post your updater.log file (unless you did a manual update).

Please also post the contents of your config.php (make sure to censor your passwords and secret).

Also, what installation method and OS?

I downloaded the package nextcloud-23.0.12.zip from the internet and unpacked it on the server.
renamed the old installation to old-nextcould moved the unpacked code in nextcloud to the place of the installation location, and copied the config.php file from the old installation into the new one
then I executed the frollowing connads
/usr/local/php80/bin/php occ maintenance:mode --on
/usr/local/php80/bin/php -c …/.user.ini occ upgrade
and this is giving me the error message after few seconds

I can not upload the file so here the content of the config.php file

<?php
$CONFIG = array (
  'passwordsalt' => '....',
  'secret' => '....',
  'trusted_domains' => 
  array (
    0 => 'marhaba.spm-uster.ch',
  ),
  'datadirectory' => '/home/spmuste/marhaba-nc17/data',
  'dbtype' => 'mysql',
  'version' => '22.2.10.2',
  'overwrite.cli.url' => 'https://marhaba.spm-uster.ch/nextcloud',
  'dbname' => 'spmuste_marhaba',
  'dbhost' => 'spmuste.mysql.db.internal',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'spmuste_marhab',
  'dbpassword' => '....',
  'installed' => true,
  'instanceid' => 'ocdc2fz2gqrk',
  'maintenance' => false,
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'manager',
  'mail_domain' => 'spm-uster.ch',
  'theme' => '',
  'loglevel' => 0,
  'default_language' => 'de',
  'default_locale' => 'de_CH',
  'force_language' => 'de',
  'default_phone_region' => 'CH',
);

Hope this is helping
PS: The updater.log is used by the updater.phar file correct?
I can not use this then it always runs on case 5 verify in a error, so I switched to occ command, that worked on the update from 22.0.x to 22.2.10. but the next update will not run and I would like to update until the latest version.
Thanks a lot for the help

Installation method is full manual then I’m on a OS: FreeBSD 13.2
I inherit this installation from a previous maintainer, I’m not sure nextcloud officially support FreeBSD 13.2.
But it run until now very stable, but know I have to upgrade because of losing PHP 8.0 support

Okay, so you’re doing a manual update. Got it. (BTW: Don’t overlook your apps! Please see item 9 in that link for details).

Please post the version.php from your installation location (and, for completeness, the one from your old-nextcloud folder too).

Old nextrcloud:

<?php 
$OC_Version = array(22,1,1,2);
$OC_VersionString = '22.1.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' => 
  array (
    '21.0' => true,
    '22.0' => true,
    '22.1' => true,
  ),
  'owncloud' => 
  array (
    '10.5' => true,
  ),
);
$OC_Build = '2021-08-26T13:27:46+00:00 1eea64f2c3eb0e110391c24830cea5f8d9c3e6a1';
$vendor = 'nextcloud';

New nextcoud version:

<?php 
$OC_Version = array(22,2,10,2);
$OC_VersionString = '22.2.10';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' => 
  array (
    '21.0' => true,
    '22.0' => true,
    '22.1' => true,
    '22.2' => true,
  ),
  'owncloud' => 
  array (
    '10.5' => true,
  ),
);
$OC_Build = '2022-07-18T12:54:51+00:00 b3b27e3f1605ee0e5bd99d72badf1b0d704032e5';
$vendor = 'nextcloud';

PS: I fixed the apps issue thanks for the hint:
Now I still have this messages what dos this mean?
Where do I have to fix them Apache or nextcloud installation?

Security & setup warnings
It is important for the security and performance of your instance that everything is configured correctly. To help you with this, we carry out some automatic checks. You can find more information in the linked documentation.

There are some warnings in your system configuration.
The “Strict-Transport-Security” HTTP header is not set to at least “15552000” seconds. For more security, it is recommended to enable HSTS as explained in the security notes.
Your web server is not configured correctly to resolve “/.well-known/webfinger”. You can find more information on this in our documentation .
Your web server is not configured correctly to resolve “/.well-known/nodeinfo”. You can find more information on this in our documentation .
No PHP memory cache has been configured. If available, configure a memory cache to increase performance. Further information can be found in our documentation .

I found the app issues with updating them removed and added the apps again now the app section is good.
Thanks for the help

1 Like

Something is not right here. Are you sure you’re looking at the correct installation and that you uploaded the new 23.0.12 code?

Where’s the 23.0.12 version.php?

Well this is the issue, when ever I tray to start the 23.0.12 upgrade I do not get very far.

Exception: Updates between multiple major versions and downgrades are unsupported.
And I have no clue way, especially it pops up just immediate after I start occ.
Dos occ write some logs?
And where can I find this logs?
Thanks for the help

<?php 
$OC_Version = array(23,0,12,2);
$OC_VersionString = '23.0.12';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' => 
  array (
    '22.2' => true,
    '23.0' => true,
  ),
  'owncloud' => 
  array (
    '10.5' => true,
  ),
);
$OC_Build = '2022-12-08T13:07:59+00:00 4eca7512330808a958cbf00bbd9044ea77b3ab6b';
$vendor = 'nextcloud';

Let’s back up a moment. You’ve now provided three different version.php files. I’m confused which ones are where in your environment.

The version.php that references 23.0.12 comes with the new code you’re uploading manually.

That file, along with all the files that came with it in the downloaded archive (zip/tar.gz/bz2), need to be placed within your real Nextcloud installation folder. See step 6 in Upgrade manually — Nextcloud latest Administration Manual latest documentation

Sorry was not my intention,

  • I took over the nextcloud Installation at version 22.1.1
  • then I could upgrade the installation to version 22.2.10 with success.
  • then I tried the upgrade to 23.0.12, then I run in this wired error message.
    So I went back to the 22.2.10 and then your advice helped to fix the issues that I overlooked.
  • then I tried again to upgrade the installation to 23.0.12, but I still have the same error.
    So I still try to figure way, until now I could not find a message with more information way I get this error:
    Exception: Updates between multiple major versions and downgrades are unsupported.
    So how can I find out what is the reason for this message
    So thanks for any pointers

So I just tried out the repair command

/usr/local/php80/bin/php -c …/.user.ini occ maintenance:repair

  • Repair MySQL collation
    • All tables already have the correct collation → nothing to do
  • Repair mime types
  • Clean tags and favorites
    • 0 tags of deleted users have been removed.
    • 0 tags for delete files have been removed.
    • 0 tag entries for deleted tags have been removed.
    • 0 tags with no entries have been removed.
  • Repair invalid shares
  • Move .step file of updater to backup location
  • Add move avatar background job
    • Repair step already executed
  • Add preview cleanup background jobs
  • Fix potential broken mount points
    • No mounts updated
  • Repair language codes
  • Install new core bundle components
  • Add log rotate job
  • Clear frontend caches
    • Image cache cleared
    • SCSS cache cleared
    • JS cache cleared
  • Clear every generated avatar on major updates
  • Add preview background cleanup job
  • Queue a one-time job to cleanup old backups of the updater
  • Cleanup invalid photocache files for carddav
  • Add background job to cleanup login flow v2 tokens
  • Remove potentially over exposing share links
    • No need to remove link shares.
  • Clear access cache of projects
  • Reset generated avatar flag
  • Keep legacy encryption enabled
  • Check encryption key format
  • Remove old dashboard app config data
  • Add job to cleanup the bruteforce entries
  • Queue a one-time job to check for user uploaded certificates
  • Repair DAV shares
  • Add background job to set the lookup server share state for users
  • Upgrading Circles App
  • Fix component of birthday calendars
    • 0 birthday calendars updated.
  • Regenerating birthday calendars to use new icons and fix old birthday events without year
    • Repair step already executed
  • Fix broken values of calendar objects
    0 [->--------------------------]
  • Registering building of calendar search index as background job
    • Repair step already executed
  • Register building of social profile search index as background job
  • Registering background jobs to update cache for webcal calendars
    • Added 0 background jobs to update webcal calendars
  • Registering building of calendar reminder index as background job
    • Repair step already executed
  • Clean up orphan event and contact data
    • 0 events without a calendar have been cleaned up
    • 0 properties without an events have been cleaned up
    • 0 changes without a calendar have been cleaned up
    • 0 cached events without a calendar subscription have been cleaned up
    • 0 changes without a calendar subscription have been cleaned up
    • 0 contacts without an addressbook have been cleaned up
    • 0 properties without a contact have been cleaned up
    • 0 changes without an addressbook have been cleaned up
  • Remove activity entries of private events
    • Removed 0 activity entries
  • Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [----->----------------------]
    • 0 calendar subscriptions without an user have been cleaned up
  • Fix the share type of guest shares when migrating from ownCloud
  • Copy the share password into the dedicated column
  • Set existing shares as accepted
  • Update OAuth token expiration times
  • Add background job to check for backup codes
  • Populating added database structures for workflows

This is the output of that command, it looks all ok for me or?