I was able to fix the problem by manually changing the version in the version.php
file of the nextcloud
volume.
This might cause irreparable problems, back up your data if you want to do the same!
The complete path for that file was: /var/lib/docker/volumes/nextcloud_nextcloud/_data/version.php
I had an old nextcloud volume lying around which I created when I initially set up nextcloud. I just used the version.php
from that volume, as I was quite confident that it had the correct version.
Here is what changed:
"incorrect" version.php
:
<?php
$OC_Version = array(23,0,3,2);
$OC_VersionString = '23.0.3';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
'nextcloud' =>
array (
'22.2' => true,
'23.0' => true,
),
'owncloud' =>
array (
'10.5' => true,
),
);
$OC_Build = '2022-03-21T13:05:48+00:00 5f6449283b5eb3cd0c96f475ff6f68a6c73a8140';
$vendor = 'nextcloud';
"correct" version.php
:
<?php
$OC_Version = array(21,0,1,1);
$OC_VersionString = '21.0.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
'nextcloud' =>
array (
'20.0' => true,
'21.0' => true,
),
'owncloud' =>
array (
'10.5' => true,
),
);
$OC_Build = '2021-04-08T13:32:52+00:00 bd555dbe8568b2509bd7d82fabbe38d76c86afbe'
;
$vendor = 'nextcloud';
After that change, I could start nextcloud in version 21 first, to check whether everything was still there. Next I was able start and update to 22 and 23 in steps just fine.
PS:
docker-compose exec --user www-data app php occ
Allows you to manually update and disable maintenance mode.