Usually, when upgrading a database, follow the guides the vendor provides. You may also take a look at the Install a Database section for general notes.
This document supports an upgrade in case there are prerequisites and/or special steps to be taken to upgrade to a particular database version.
ownCloud runs fine when using a MariaDB version lower than 10.6. You can upgrade ownCloud as usual without special considerations regarding the database.
When planning to upgrade to MariaDB 10.6, some prerequisites have to be met and upgrade steps have to be taken.
This is mostly due to the fact that, unlike before, in MariaDB 10.6 tables of the COMPRESSED row format are read-only by default. For more information see the InnoDB COMPRESSED Row Format document.
|This process only needs to be carried out once.|
You must have upgraded your ownCloud installation to version 10.9 or above. To do so, follow the Manual ownCloud Upgrade guide.
Backup your ownCloud installation, especially the database. To do so, follow the Backing up ownCloud guide.
When running a MariaDB release lower than 10.5, you have to upgrade step-by-step for each minor release up to 10.5.x. Follow the respective Upgrading MariaDB guide.
You must not skip minor releases of MariaDB when upgrading like from 10.3 → 10.5, you have to upgrade to each minor version in between step by step.
Have a backup of your database to rollback in case of issues.
Set ownCloud in maintenance mode
sudo -u www-data php occ maintenance:mode --on
Prevent browser access
Stop your web server to prevent users from trying to access ownCloud via the web. As an alternative, you can stop serving the virtual host for ownCloud.
Stop the web server:
sudo service apache2 stop
Run an occ command to prepare the database for the upgrade
sudo -u www-data php occ db:restore-default-row-format
Upgrade MariaDB to version 10.6.x
Follow the instructions in the Upgrading MariaDB guide.
Set ownCloud back to normal operation mode:
sudo -u www-data php occ maintenance:mode --off
Enable browser access
Start your web server, Alternatively, enable the virtual host serving ownCloud again:
sudo service apache2 start