A Virtualmin backup only backs up databases by performing a mysqldump. That is the only way to safely backup a database…the binary files are not guaranteed to work from one version to another, and definitely won’t work going from MySQL to Mariadb.
If a restore fails because of the database, you’ll either need to munge the data manually or stick with MySQL. We’re not experts on migrations from MySQL to MariaDB. Mostly, it Just Works, as the two are very nearly compatible. But, they have begun to diverge (we should have switched Ubuntu over sooner…MySQL is seemingly intentionally introducing incompatibilities now, and has been for some time).
This has been discussed quite a bit in the forums. I recommend you do a search of posts about the change in Virtualmin 7.
With Virtualmin 7, we default to mariadb on all distributions. We switched to MariaDB on all but Ubuntu during Virtualmin 6, now they’re all MariaDB, as the Ubuntu community seems to have caught up and prefers MariaDB, as well.
If you are coming from a Virtualmin 6 system on Ubuntu, and you don’t have the experience to migrate a database from MySQL to MariaDB (dumps are not always compatible without a little data munging…the incompatibilities are minor, but still probably need some reading and experimentation to sort out), and a dump/restore has errors, you should probably stick with MySQL. I’ve discussed how to switch to MySQL on a fresh installation, but to review:
- Install Virtualmin. Do not run the postinstall wizard or even login to Webmin.
- Install MySQL, replacing MariaDB, client, server, and libs.
- Make sure MySQL is now installed and running (
systemctl status mysql
). Login to Webmin and go through the postinstall wizard. You’re now running MySQL and any databases dumped on MySQL should import without complaint.
Note that even now, most apps stick with a compatible subset of functionality between MySQL and MariaDB, so usually a dump/restore will work. But if you have custom development, or have been using any apps that are very focused on MySQL, use new database features, and don’t pay attention to compatibility with MariaDB, you may have errors. In which case, the options are to fix the errors and import the db manually, or not even try and just stick with MySQL (but, MySQL will probably keep getting less compatible over time, and you’ll be further entrenching yourself in that ecosystem, which we’re all mostly leaving behind).