Can't start Nextcloud because the version of the data (14.0.1.1) is higher than the docker image version (14.0.0.19) and downgrading is not supported. Are you sure you have pulled the newest image version?
,
How did you upgrade to nextcloud 14.0.1?
from nc 14.0 upgraded
if version.php this;
$OC_Version = array(14,0,0,19);
$OC_VersionString = '14.0.0';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
'nextcloud' =>
array (
'13.0' => true,
'14.0' => true,
),
'owncloud' =>
array (
),
);
$OC_Build = '2018-09-06T07:44:25+00:00 1b35dc1cbafe318933ba0c11212a9c3c6b787700'
;
$vendor = 'nextcloud';
....
could't started nextcloud container but i've replace this;
$OC_Version = array(14,0,1,1);
$OC_VersionString = '14.0.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
'nextcloud' =>
array (
'13.0' => true,
'14.0' => true,
),
....
container started. restart failed repeat change version.php start container etc..
from nc 14.0 upgraded
I want to know how you upgraded. Nextcloud 14.0.1 is not yet on docker hub. Which means it should be impossible for you to upgrade to 14.0.1 by pulling the 14.0.1 image.
updater also upgraded 14.0.1. nextcloud:latest used image
The web based updater should't work. We have removed it from the image.
how to restore ?
root@73ff34cca092:/var/www/html# sudo -u www-data php occ status
can you explain in more details how you were able to update?
did the the web based updater work?
is there a file named updater in your /var/www/html dir?
root@73ff34cca092:/var/www/html# ls updater/
index.php updater.phar
root@73ff34cca092:/var/www/html# sudo -u www-data php updater/updater.phar
Nextcloud Updater - version: v14.0.0RC1-2-ga2ab9c5
Current version is 14.0.1.
No update available.
Nothing to do.
root@73ff34cca092:/var/www/html#
oh yes, i'm restored nc 14.0.0 updater backup :+1:
rsync -Aax nextcloud-dirbkp/ /var/www/html/
root@73ff34cca092:/var/www/html# sudo -u www-data php occ status
i don't use never updater. :)
https://docs.nextcloud.com/server/12/admin_manual/maintenance/restore.html
Thanks
Sorry for the inconvenience. The updater should be disabled. I will check why it isn't disabled.
I can't reproduce this. I checked all image versions and none of them have the updater dir in the webroot.
I think I'm seeing the same thing.
I have a daily docker-compose build --pull && docker-compose up -d running at 01:01 daily, and Saturday the PCs were not connected. When I go to the website, I get a screen prompting to press a button to update to 14.0.1 which fails.
Ran from server docker-compose exec --user www-data app php /var/www/html/occ upgrade, and I get something like:
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
Set log level to debug
Updating database schema
Updated database
Checking for update of app cloud_federation_api in appstore
An unhandled exception has been thrown:
Error: Call to undefined method GuzzleHttp\Client::request() in /var/www/html/lib/private/Http/Client/Client.php:161
Stack trace:
#0 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(106): OC\Http\Client\Client->get('https://apps.ne...', Array)
#1 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(80): OC\App\AppStore\Fetcher\Fetcher->fetch('', '')
#2 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(170): OC\App\AppStore\Fetcher\AppFetcher->fetch('', '')
#3 /var/www/html/lib/private/Installer.php(385): OC\App\AppStore\Fetcher\Fetcher->get()
#4 /var/www/html/lib/private/Updater.php(445): OC\Installer->isUpdateAvailable('cloud_federatio...')
#5 /var/www/html/lib/private/Updater.php(256): OC\Updater->upgradeAppStoreApps(Array)
#6 /var/www/html/lib/private/Updater.php(126): OC\Updater->doUpgrade('14.0.1.1', '14.0.0.19')
#7 /var/www/html/core/Command/Upgrade.php(262): OC\Updater->upgrade()
#8 /var/www/html/3rdparty/symfony/console/Command/Command.php(251): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/console.php(96): OC\Console\Application->run()
#14 /var/www/html/occ(11): require_once('/var/www/html/c...')
#15 {main}
I tried disabling alphabetically each app until it got to cloud_federation_api, and then decided it's probably going to do that for any and every enabled app and won't be happy once I disabled everything anyway.
Currently getting this from status:
docker-compose exec --user www-data app php /var/www/html/occ status
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
- installed: true
- version: 14.0.1.1
- versionstring: 14.0.1
- edition:
and cannot work out how to revert (I tried changing the Dockerfile from nextcloud:fpm to nextcloud:14.0.0-fpm, but the container was perpetually restarting).
I managed to update via the web updater, it was not disabled. Now after trying to rebuild the container I鈥檓 stuck with the same message: _data is higher than the docker image version_. Any way out?
I think the reason why the web updater was available was because I migrated from a non-Docker version to Docker. Now I鈥檓 stuck in this Catch-22. Could it be possible to declare a lower version in the data? I tried in the settings.php but this was not the string docker was looking at. Any suggestions?
This worked for me: https://mergy.org/2018/01/getting-around-the-false-nextcloud-update-exception-updates-between-multiple-major-versions-and-downgrades-are-unsupported-update-failed/
I was upgrading from 12->15 which I know is a bad plan but got in the same sort of loop in that it wouldn't let me upgrade, but pulling in the older image resulted in the container exiting with data version mismatch. The lines to edit were different and in fact I just commented out the call to check the version completely in the doUpgrade() function.
I then exec'd into the container, did:
`apt-get update
apt-get install sudo
sudo -u www-data php occ upgrade
sudo -u www-data php occ maintenance:mode --off`
@J0WI , could you explain why this issue was closed? It's not fixed
The mentioned versions are EOL and a solution has been provided in https://github.com/nextcloud/docker/issues/471#issuecomment-446586402.
The solution has not been provided. The linked page just shows a title, no content. The issue is also reproducible with any other version, including 18 -> 20.
The solution has not been provided. The linked page just shows a title, no content. The issue is also reproducible with any other version, including 18 -> 20.
Hi @nicbou . The link page seems to have changed now unfortunately. It's a while since I had to do this, but from memory:
Look for the doUpgrade() function in the file "lib/private/Updater.php":
The lines look something like the below:
`
// Stop update if the update is over several major versions
$allowedPreviousVersions = $this->getAllowedPreviousVersions();
if (!$this->isUpgradePossible($installedVersion, $currentVersion, $allowedPreviousVersions)) {
throw new \Exception('Updates between multiple major versions and downgrades are unsupported.');
}
`
I just commented all of those lines out so that the function continues.
(apologies for the code formatting, it seems my code block fu has hit a block....)
Thank you for your assistance. I pieced a dozen old threads together and came up with a detailed solution: https://nicolasbouliane.com/blog/nextcloud-docker-upgrade-error
tl;dr:
Most helpful comment
This worked for me: https://mergy.org/2018/01/getting-around-the-false-nextcloud-update-exception-updates-between-multiple-major-versions-and-downgrades-are-unsupported-update-failed/
I was upgrading from 12->15 which I know is a bad plan but got in the same sort of loop in that it wouldn't let me upgrade, but pulling in the older image resulted in the container exiting with data version mismatch. The lines to edit were different and in fact I just commented out the call to check the version completely in the doUpgrade() function.
I then exec'd into the container, did:
`apt-get update
apt-get install sudo
sudo -u www-data php occ upgrade
sudo -u www-data php occ maintenance:mode --off`