V
V
vlarkanov2018-05-25 13:14:12
linux
vlarkanov, 2018-05-25 13:14:12

How to transfer the mysql database (MariaDB) to another server as quickly as possible?

There is a base (256gb). It needs to be transferred to another server. The matter is complicated by the fact that on the old server the version is 10.0.32-MariaDB-0+deb8u1, and on the new one it is 10.1.26-MariaDB-0+deb9u1.\ RAID1) on which the base now lives will be transferred to a new server, incl. streaming backup is not possible.
Servers can be stopped for a reasonable time.
1) Is it possible to just transfer the contents of /var/lib/mysql to a new server? The MariaDB version is different, but only for the minor version.
If not:
2) Should I use XtraBackup in this case?
if this is not possible:
3) How can I speed up the creation / dump dump using mysqldump as much as possible?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Fixid, 2018-05-25
@Fixid

A little known, but the fastest way to transfer a database:
Data flows directly between databases in the form of SQL. The last time I poured the base into 100GB, it turned out 99% utilization of the channel and a little more than 2 hours in time

M
Melkij, 2018-05-25
@melkij

The MariaDB version is different, but only for the minor version.

This is a major release.
Study the upgrading part of the manual: https://mariadb.com/kb/en/library/upgrading-from-m...
In theory, replication works for mariadb between the nearest major versions, so the fastest thing is to raise the replica, then promote to the master.
Ah, not your case. Yes, physically transferring disks will be faster, but usually there is no such possibility. See instructions for major upgrade, inplace upgrade is possible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question