On 2014-01-11 20:05, Felipe Carballo wrote:
> Hello folks,
>
> I built a MariaDB + Galera cluster and now I need migrate my production
> database to this new cluster.
>
> My production database has ~250GB. The MySQL dump took a long time to
> complete and now I'm trying to import it to the cluster.
>
> I'm restoring the dump in a specific node. However, after some minutes,
> the
> importing stops with the error message "MySQL Server Has Gone Away".
> Reading the logs of this specific node I see no message indicating that
> MariaDB was restarted.
>
> Does anyone have some clue about what is going on?
1) Does error log contain any messages for that period of time?
2) I would suspect that you used --single-transaction option to
mysqldump which would create huge transactions on mysqldump import.
Galera has 2Gb limit on transaction size, so that will most likely be
triggered. In this case simple editing of mysqldump file to remove START
TRANSACTION/COMMIT statements should fix it.
> Should I use another
> approach? And If I make a copy of the database files from the
> production to
> a specific node, the database is gonna be synced between the nodes?
With this you'll need:
1) shut down all cluster nodes
2) remove grastate.dat file from the node you'll be copying the data
directory to.
3) copy data directory (or use xtrabackup)
4) start that node
5) start other nodes - they will copy db from the first one.
or
1) shut down all cluster nodes
2) copy data directory to ALL nodes
3) start the cluster again
> Thank you!
>
> Regards,
>
> Felipe Carballo
--
Alexey Yurchenko,
Codership Oy,
www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011