Nextcloud - Downgrading is not supported and is likely to cause unpredictable issues

NethServer Version: 7.9.2009
Module: Nextcloud

Nextcloud 25.0.0.18 was working fine until 11/07 then stopped working and the following message appeared:

OCP\HintException: [0]: Downgrading is not supported and is likely to cause unpredictable issues (from 25.0.0.18 to 24.0.7.1) ()

No manual updates were perfomed

Hello,

the version you are using is not (yet) supported by Nethserver.

Regards…

Uwe

how can I resolve this and why was it able to upgrade to a version thats not supported? As mentionned in the original post it was working fine until 4 days ago.

Which way did you use to update?

Hi

This

only happens if:

you update via NC Webconsole or with OCC - this is known to break the NextCloud/NethServer…

My 2 cents
Andy

The webconsole was set to auto-update.

thank you Andy,

Yes i remember in the web console the auto-update was enabled and I was able to use the system afterwards until 11/07

Maybe what happened is that you updated to 25.0.0.18 through web updater and later on system updates installed the rpm version (nextcloud 24.0.7.1). So different update channels where used.

May be yum downgrade nethserver-nextcloud-1.20.2-1.ns7 wil make you happy.

That’s my thinking ! thank you

no luck , no packages found

@pk198105 please, post the output of rpm -qa nethserver-nextcloud* should tell which package is installed now.

Hello Michael
here is the output:

rpm -qa nethserver-nextcloud*
nethserver-nextcloud-1.20.2-1.ns7.noarch

if downgrade is not possible for some reason…

untested, but a plausible solution could be to backup the nextcloud config file, manually download the same version you installed through web updater and unpack it on destination replacing the files (files on /usr/share/nextcloud, making sure file permissions are correct, you can compare them with the actual permissions and owner), and then manually setting the correct version in config file.

having a backup of the files and the database, et cetera is always recommended.

I am no linux, NextCloud and packages expert
But i’d try to query which Nextcloud package is installed, purge it, then reinstall nethserver-nextcloud.
This is a path, but my knowledge and experience cannot tell you if it’s viable or not.

problem is the message I’m getting is both in CLI and in browser.

No access to the UI and OCC is totally broken. I did manage to get slightly ahead, i disabled PHP 80 and got a different message on the browser saying server is unavailable but on CLI same message about downgrading. I think the issue is PHP, i would like to know how to upgrade PHP

Personal opinion: i suggest you to not upgrade PHP currently.

1 Like

PHP 8.0 works with nextcloud 24 and as you experienced it also worked with nextcloud 25. So that’s unlikely the problem.

I could be wrong on some points but things could have gone (more or less) in this way:

The web updater replaced nextcloud installation files, probably modified something about the database (like something that is checked during upgrade and one of the things preventing the downgrade, unsure about that), and also some parameters in the config file (version…)

To keep it short and disregarding some steps, the rpm update replaced nextcloud files, probably didn’t modify the database as it was stopped by the nextcloud error, and maybe changed the version in the config file. Other things (php and mariadb versions) were already the same and should make no difference.

So you now have:

  • nextcloud 24 files
  • nextcloud 25 database
  • nextcloud 24/25? config file

And need, at least, to “upgrade” the nextcloud 24 files to nextcloud 25.

Before messing with this, make a copy /usr/share/nextcloud (so with that you preserve config file, config folder, data folder, and apps folder). Then follow nextcloud upgrade guide adapting it to nethserver paths.
Have backups (and snapshots depending on what you use)

Some excerpts from the docs:

  • Manually upgrading is also an option for users on shared hosting; download and unpack the Nextcloud tarball to your PC. Delete your existing Nextcloud files, except data/ and config/ files, on your hosting account. Then transfer the new Nextcloud files to your hosting account, again preserving your existing data/ and config/ files.

or

Manually upgrading with the Nextcloud .tar archive

Downgrading is discouraged by nextcloud:

Warning

Downgrading is not supported and risks corrupting your data! If you want to revert to an older Nextcloud version, make a new, fresh installation and then restore your data from backup. Before doing this, file a support ticket (if you have paid support) or ask for help in the Nextcloud forums to see if your issue can be resolved without downgrading.

Replacing version on config file could trick occ and let it run through but with old install files and more recent database from different nextcloud major version results are unpredicted.

2 Likes

Thank you so much for the guidance. I will give it a try. I wish Nextcloud could have put better safety checks. Their updater is terrible.