C
C
Cat Anton2021-04-28 01:58:22
MySQL
Cat Anton, 2021-04-28 01:58:22

Migrating data from MariaDB to Percona?

We have a server with a MariaDB database and a Percona cluster. We need to transfer some data (several tables in the database) from MariaDB to Percona.

Wishes:
1. MariaDB server is very lively, many INSERT / UPDATE / DELETE queries in tables. Transfer as seamlessly as possible without stopping work with the base. Let's say downtime and data loss for a maximum of a couple of minutes at the time of switching to a new database.
2. On the backend, we mainly have PHP and a little go. I really don't want to do migration on tools written in other languages.
3. Ideally, but not necessarily, you need the ability to switch back to MariaDB if something goes wrong after the transition.
4. We need a solution that will allow in the future to do similar operations with little bloodshed.

Tell me, how can this be done? What to read?

PS: We had a hypothesis that you can connect to binlogs and use them to duplicate data from one database to another. But in the simplest version, `SHOW BINLOG EVENTS` issues queries in raw form (without primary keys), and this destroys the whole scheme.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2021-04-28
@vitaly_il1

We need to transfer some data (several tables in the database) from MariaDB to Percona.

IMHO, the idea is wrong. Or I missed a serious reason why you may need to transfer part of the database to another server to another engine.
Make a PoC on the perkone, and if you like it, transfer everything.
the hypothesis that it is possible to connect to binlogs,

The direction is correct. The standard practice for migrating to a new server is replication, and replication in mysql is based on binlogs. So read about replication (mysql replication).
the ability to switch back to MariaDB

Very difficult to implement, because requires master-master replication.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question