Upgrade Mariadb from 10.3.39 to 11.4.5

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version 10.0.10
  • Operating system and version Ubuntu 20.04.6 LTS
  • Web server and version Apache version 2.4.63
  • PHP version Version: 8.2.27
  • Are you using CloudfIare, mod_security, or similar? NO

Summary of the issue you are facing:

Everything is working fine. but now I am getting a message

MariaDB version 10.3 detected, this version is end-of-life and only supported as part of Ubuntu 20.04. MariaDB >=10.6 and <=11.4 is suggested for best performance, stability and functionality with this version of Nextcloud.

in overview.

I use Webmin to administer the machine and it has a MariaDB module. I backed up the running DB on the live machine, spun up a Virtual Box with UBUNTU 22.04 and installed MariaDB 11.4.5. I then used Webmin to restore the nextcloud SQL dump and it imported with no problem.

The Maria DB site does not have specific instructions for upgrading from 10.3.39 and 11.4.5. All of the update instructions are rather involved and complex involving mariadb-backup prerequisites and post processing.

I don’t think my sledge hammer sql dump method will produce a working nextcloud db because of user meta data not stored in the nextcloud data tables.

Any suggestions going fromm 10.3 to 11.4? It is not documented on the Maria DB or the Nextcloud site.

Thanks in advance.

It looks more complex than it actually is.

mariadb-backup is only the recommended way to backup, but if you have an SQL dump you should be fine. Better of course would be to have a full system backup, e.g. a backup or snapshot of the VM, so that you could easily roll back the hole system to a previous working state if things go wrong.

Post-processing also sounds like more than it actually is. The following two things are recommended:

  1. Make any desired changes to configuration options in my.cnf, and remove any options that are no longer supported. If you’re not sure, what those options are, you could just use the default my.cnf from the new version, and then adapt your changes to the new file, or use the recommended values from the Nextcloud docs: Database configuration — Nextcloud latest Administration Manual latest documentation

  2. run mariadb-upgrade, which checks that the system tables in the mysql database are fully compatible with the new version, and does a quick check of all tables and marks them as compatible with the new version of MariaDB

Anoter possibilty, instead of upgrading MariaDB independently, would be to upgrade Ubuntu, which you probably should do anyway, unless you have an Ubuntu Pro Subscription, because standard LTS support of 20.04 ends this month: Ubuntu release cycle | Ubuntu

Please tell me this is a mistake. If not, forget all the above, and set up a new server with a current Nextcloud version. :wink:

Thanks very much for the reply, I’ll set to work on the upgrade and let you know how it turns out.

1 Like

Btw, two more things…

I probably wouldn’t go directly to 11.4, but rather do the following path: 10.3 → 10.6 → 10.11 → 11.4.

It is also not necessary to upgrade to 11.4 right away, especially if it is only a matter of 11.3 beeing end-of-life. 10.6, which is still supported by MariaDB until July 2026, or 10.11 until February 2028, would both still be sufficient. MariaDB Lifecycle: End Of Life And Support Status

1 Like

Hey there bb77. First thanks for all your help. I spun up a virtual machine with nextcloud under Mariadb 10.3 with some of the data off my live install.

I found that the leap from 10.3 to 11.4 worked fine. I put nextcloud in maintenance mode, turned off Apache and Mariadb and performed the update.

my commands were:

  1. /var/lib# curl -fsSL http://mirror.mariadb.org/PublicKey_v2 | sudo gpg --dearmor | sudo tee /usr/share/keyrings/mariadb.gpg > /dev/null

  2. echo "deb [arch=amd64,arm64,ppc64el signed-by=/usr/share/keyrings/mariadb.gpg] http://mirror.mariadb.org/repo/11.4/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mariadb.list

  3. apt-get remove mariadb-server

  4. apt install mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy

  5. apt install mariadb-server mariadb-client -y

Enabled everything and it is working perfectly. BTW the install script performed the mariadb-upgrade.

1 Like

Good to know, and thanks for posting the solution. :+1: :slight_smile:

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.