Upgrade MariaDB to 10.3: backup without mysqldump?

greektranslator

Well-Known Member
Jun 5, 2011
88
2
58
Greece
cPanel Access Level
Root Administrator
I can see the warning when I try to do that:

In MariaDB® 10.3, the mysqldump client includes logic for the mysql.transaction_registry table. You cannot use the mysqldump client from an earlier MariaDB release on MariaDB 10.3 and later. For more information about how to upgrade to MariaDB 10.3, read the documentation .

The link in the documentation does not explain how to take a backup, given that a backup with mysqldump would be useless in this case.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello @greektranslator,

You'd need to generate new database backups (either using mysqldump or through the backup options offered in cPanel & WHM) after upgrading to MariaDB 10.3. It's only the backups that are generated prior to the MariaDB 10.3 upgrade that are unusable post-upgrade.

The backups you generate prior to upgrading to MariaDB 10.3 remain useful if something goes wrong and the MySQL upgrade attempt fails.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Right thanks. How can I make a backup of all dbs in separate gzipped files with mysqldump? (Centos 7.6)
Hello @greektranslator,

You can find untested user-submitted examples of how to do this on posts such as the following:

backup databases

However, generally, the better approach is to generate the MySQL backups as part of cPanel backups through /scripts/pkgacct:

The pkgacct Script - Version 78 Documentation - cPanel Documentation

You can use the "skip" flag to skip most other aspects of the account.

Thank you.
 

vincentg

Well-Known Member
May 12, 2004
159
4
168
new york
How in gods name are you supposed to use any backup tool from cpanel prior to upgrading?
You can't!!!
It seems you need to install Mariabackup
Mariabackup

Of course you can just upgrade and hope all goes well or use the advice of those that don't seem to know that can't use mysqldump means can't use it in any form or any method.

If you go ahead and use pkgacct or cpanel backup your still using mysqldump.
If you care about your clients doing this upgrade with no backup is risky.
What will you do if a few clients have problems?
You can't revert to a mysqldump file.

I am not sure if we just copy a data base file will work but I think Mariabackup is the only safe backup prior to upgrading.
If someone else knows of another way I would love to hear it.

I think Mariadb should have come up with a simple solution for this so we don't wind up having to install software we don't really need ever again.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello @vincentg,

The idea is that you should backup your MySQL databases prior to upgrading to MariaDB 10.3. If anything goes wrong with your data during a failed upgrade attempt, you have a backup of your databases available to restore since the failed upgrade will revert back to MySQL.

Once the upgrade to MariaDB 10.3 succeeds, then all new backups you make through cPanel or the mysqldump command are usable.

Thank you.
 

vincentg

Well-Known Member
May 12, 2004
159
4
168
new york
I see so just go ahead and backup using a backup that is useless after the upgrade and hope that all databases are ok when it's done.
What if 6 databases are not good after the upgrade?
What if more are a problem?
What then?
Uninstall 10.3 and install the older version?
Serious down time don't you think?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello @vincentg,

That's certainly a valid concern. One approach you can take is to temporary setup a secondary server for testing purposes. Once the secondary server is setup and cPanel & WHM is installed (a free trial license is utilized by default), you can then migrate your accounts to that test server (without changing the DNS) via WHM >> Transfer Tool. At that point, you'd upgrade MySQL or MariaDB to the new version, update the hosts file on your local workstation to point the domains to the test server, and then verify the scripts function as expected on the new MySQL/MariaDB version.

Thank you.