Update to 22 failed with database error - Updated

Update to 22 failed with the following messages:

Update vorbereiten

Log-Level auf “debug” gesetzt

Wartungsmodus eingeschaltet

Repair MySQL collation

All tables already have the correct collation → nothing to do

Repair SQLite autoincrement

Copy data from accounts table when migrating from ownCloud

Drop account terms table when migrating from ownCloud

Das Datenbankschema wird aktualisiert

Exception: Database error when running migration latest for app core

No idea what this should tell me.

The setup is:
Latest MariaDB and Nextcloud run within Docker.

It there anything else you need to know?

If this turns out, that there is no solution: I have not found yet any solution how to roll back. Is there a howto somewhere, how this can be achieved?

Thanks for helping,

Okay, guys, it was not very nice not to receive any answer about updating to 22-Problems, but anyways, we found what it is all about:
MariaDB 10.6 does no longer support compressed columns. So if you run your Nextcloud and MariaDB on Docker, pulling the latest updates, you will run into this issue.
So it helps to restore your MariaDB. But you will need to delete the row with “compressed” data within somewhere at the first 15 lines of your dump.

@Nextclouders: Go and delete the compressed col stuff. Thanks.

Thanks for putting in the effort. I have the same problem, though I am running Manjaro and I cant really downgrade MariaDB.
But I think I found a solution. Just uninstall this desaster called nextcloud. Update 21 was several hours of work, update 22 same. Like I gonna spend my life fixing software that was supposed to make my live easyer.
Funny thing is, there is a popup windows here on this homepage that reads:
“The biggest improvements Nextcloud Hub 22 introduces are:”
They call not working at all an improvement?

Your issues have nothing to do with the Nextcloud software. They have to do with the fact that you are using Nextcloud on a rolling release distro that is primarily developed for desktop use. Generally, it is recommended to use LTS distributions for server use. With server software that depends on various components, you can’t always just blindly upgrade everything, without first clarifying what impact that might have.

If you want a simpler solution where others already did some of the work for you, you could use an appliance like NextcloudPi or the Snap Package.

Or you could put it in a VM or use Docker. The possibilities are endless… But installing it natively on a rolling release distro, possibly even on your main work or home computer, is pretty much the worst choice of all and you are literally begging for issues, if you do that.

1 Like

Although I thought that I had configured NC not to update automatically, it actually seems to have started an update to v22, but it got stuck and showed a “nextcloud in maintenance mode” message.

After having disabled that, it appears that I have the very same issue and unfortunately I have to admit, that I am stuck. No idea how to solve the issue.
Can you elaborate? (or is there any recent fix?)

guess you need to describe your setup.
My issue was about MariaDB 10.6 at the end of the day. They changed their settings regarding the “Compressed” feature of rows. This is deprecated now, but Nextcloud uses this. So to allow an update you need to import your dump without this flag in your dump:

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounts` (
  `uid` varchar(64) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  `data` longtext COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`uid`)
/*!40101 SET character_set_client = @saved_cs_client */;

Hope this helps and hope Nextcloud is going to change this for 22.


Or just stay on MariaDB <10.6 and wait and hope that there will be an official migration guide at some point. Time is not of the essence. Every major MariaDB version has 5 years of support. :wink:

You are right. Until now, our puppet fact was set to “latest releases”, but we stopped this now. In addition to this, we are setting up one VM as DEV-Instance of NC.

That’s a pretty good idea anyways. I always test new versions of NC and dependencies before I roll them out in “production”. And that although I only use Nextcloud for personal things. But since I also migrated my girlfriend from Goggle to my NC, I can’t afford downtime anymore :smiley:

I feel you mate!

I could (at least temporarily) solve the issue by specifying

SET GLOBAL innodb_read_only_compressed=OFF;

in MariaDB.

Continuing the update process then worked without further issues. Thanks for pointing me into the right direction.

1 Like

As I had been successful by switching off the default read-only flag for compressed data ( innodb_read_only_compressed=OFF), I wonder if it would be an alternative to alter the tables from row_format compressed to e.g dynamic.
Would this work or does Nextcloud rely on the compressed format? If this is the case, what is the perspective (assuming that the row_format compressed will be dropped with one of the next releases)?

Setting innodb_read_only_compressed=OFF; in /etc/my.cnf worked for me too.
Update process finished without errors
Thanks for the hint
As additional info: I am on arch linux


How would you turn that off if you’re using docker containers?

You saved my life this evening. thanks… :partying_face:

1 Like

I use docker-compose. The reply from @tjohs and others above pointed me in the right direction. I added the following to the commandline options for mariadb in the docker compose image:

This worked for me.

My mariadb section now looks like:

image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb_read_only_compressed=OFF
restart: always


1 Like

Hi All,
So, where to put this magic - innodb_read_only_compressed=OFF ?
it must be done inside the docker.compose file ?
(Same situation after updates to 22, NC is in docker)


I’m not a docker expert, but I would say yes. Just add the command --innodb_read_only_compressed=OFF like described in the post before yours. You can find other examples here… Database Incompatibility with MariaDB 10.6.0 · Issue #1492 · nextcloud/docker · GitHub

Thanks bb77,
I tried to add this command to the docker compose but I see again “Update” page and when I click it then I see:

Thanks everyone for cooperation.
Finally it was done when I add:
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed
instead of:
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb_read_only_compressed=OFF

PS: skip vs OFF :slight_smile: