How to migrate from MariaDB 5 to Version 10

SYSTEM INFORMATION
OS type and version CentOS Linux 7.9.2009
Webmin version 2.105

I would appreciate it if you could tell me how to install MariaDB 10 on a system that is already running MariaDB 5.

This is probably a question for the Mariadb docs/community. Upgrading MariaDB - MariaDB Knowledge Base

Historically speaking, a major version change meant, “dump on the old version, upgrade the packages, restore on the new version”. I believe newer versions of Mariadb can perform in-place upgrades in most cases. But don’t quote me on that, and it’s been so long since I upgraded a system from Mariadb 5 to 10 that I don’t remember how it works.

You should expect some downtime, and you should make sure you have good backups before beginning. I like to make a binary backup of the database directory and an SQL dump before beginning any major database changes.

1 Like

I would suggest (again) not investing time in a distro like CentOS 7, which will reach its end-of-life in just a few months, and instead migrate to Rocky 9.3.

Please how can I migrate my whole system on a new distro like Rocky 9.3. Is there a guide

I went from Centos 7 to a clean Rocky 8 just with Virtualmin Backup and Restore.
Can you do a test run like that?

1 Like

First off make full backups of all domains and verify that these backups are readable and contain the information you need (mysql,html,email etc)
Make notes on all custom scripts you have installed (may be you installed midnight commander or something), you will be installing them back later. When you are happy that the backups are good & you have all the information about the custom scripts installed, it is time to add the new OS.

  1. If you have the resources, you could restore the backups to another (temporary) VPS running the new OS and virtualmin do some testing with this to make sure everything works
  2. if your server is with a provider go to your admin panel at your provider and select a new OS, most providers have an array of OS to choose from, so that is your choice, and install the OS you want. After your VPS is rebuilt with the new OS, install virtualmin using the virtualmin installer script.
    Once you have virtualmin running on the updated OS, restore the backups you made earlier, which should return virtualmin back to how it was on your old OS, which maybe is all you need to do unless you have some custom scripts to install.
  3. If you are running this at home you have a lot more work to do, and careful planning is essential

In addition to what was already mentioned, you should also check our Migration Guide.

Furthermore, don’t use Rocky or Alma 8 in 2024; instead, opt for version 9! Good luck!

The Virtualmin backup process does a database dump and on restore it re-runs the SQL from the dump, so yes, this is a good option, as it bypasses whole categories of database upgrade problems (it can even go from MySQL to Mariadb, but only easily with older MySQL versions to Mariadb, since MySQL has made incompatible changes since Mariadb forked off…Oracle doing what Oracle does).

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