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 rollback in case of issues. To do so, follow the Backing up ownCloud guide.
Prepare the database for the upgrade with an occ command.
Follow the respective Upgrading MariaDB guide to upgrade MariaDB.
If not already done, upgrade the ownCloud installation to version 10.9 or above.
Set ownCloud in maintenance mode
sudo -u www-data ./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 ./occ db:restore-default-row-format
Upgrade MariaDB to version 10.6+
Follow the instructions in the respective Upgrading MariaDB guide to upgrade MariaDB.
If required, run the
mysql_upgradecommand when using a binary installation or as example
docker-compose exec owncloud mysql_upgrade -uroot -p
when using a dockerized environment as part of the upgrade procedure.
Set ownCloud back to normal operation mode:
sudo -u www-data ./occ maintenance:mode --off
Enable browser access
Start your web server, Alternatively, enable the virtual host serving ownCloud again:
sudo service apache2 start