I accidently pulled the wrong image when I wanted to upgrade from 22.2.5.1 to 23.0.4. I used the image of 24.0.0. When I tried to roll back I got the following message
Can't start Nextcloud because the version of the data (24.0.0.1) is higher than the docker image version (22.2.5.1) and downgrading is not supported. Are you sure you have pulled the newest image version?
I found a lot of similar post here and the following walkthrough for a roll-back:
I followed the instructions step by step and also restored the database from a backup. I edited the version.php
to look like this:
<?php
$OC_Version = array(22,2,5,1);
$OC_VersionString = '22.2.5.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
'nextcloud' =>
array (
'21.0' => true,
'22.0' => true,
),
'owncloud' =>
array (
'10.5' => true,
),
);
$OC_Build = '2022-05-02T14:34:20+00:00 5f37aacb3194d51503aaa3529ae8f676b32a25d7';
$vendor = 'nextcloud';
I was then able to start up a container on the old image (22.2.5.2). I then tried to upgrade to 22.2.7 or 23.0.4 but was not able to get the upgrade to work:
Timeout while waiting for an ongoing initialization
Initializing nextcloud 23.0.4.1 ...
Upgrading nextcloud from 22.2.5.1 ...
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
Another process is initializing Nextcloud. Waiting 10 seconds...
Another process is initializing Nextcloud. Waiting 20 seconds...
Another process is initializing Nextcloud. Waiting 30 seconds...
Launching the upgrade manually via docker exec -u www-data nextcloud_app_1 php occ upgrade
leads to:
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
Maintenance mode is kept active
Resetting log level
Any help is greatly appreciated!