Hi all,
I’m trying to back up then restore data to a new Cluster. The data is large as more than 70gb.
- I installed two new Galera Clusters, Cluster 1 and Cluster 2, these two Clusters replicate data each other via replication setting (using binlog). Cluster 1 has a node repicates data with a node from Cluster 2, and vise versa. So every write transaction to Cluster 1 can be replicated to Cluster 2. I tested writing data to Cluster 1 and Cluster 2, replicating process works correctly.
+------------------+ +------------------+
| Galera Node 1 | | Galera Node 4 |
| (Cluster 1, Node)| | (Cluster 2, Node)|
+------------------+ +------------------+
^
|
+------------------+ +------------------+
| Galera Node 2 | | Galera Node 5 |
| (Cluster 1, Node)| | (Cluster 2, Node)|
+------------------+ +------------------+
^
|
+------------------+ +------------------+
| Galera Node 3 |<------------------------>| Galera Node 6 |
| (Cluster 1, Node)| | (Cluster 2, Node)|
+------------------+ +------------------+
- I tried generating dump file and restore to a node in Cluster 1 (I see data come to all nodes in both Clusters), but after some minutes, there is an “Deadlock” error, even I try to restore data when Cluster 2 down, its still the same error, I tried to run restoring for a standalone mysql, it can easily succeed:
> mysqldump -u root -p <password> --set-gtid-purged=OFF --skip_add_locks --skip-lock-tables --single-transaction <database_name> > backup.sql
> mysql -u root -p <password> <database_name> < backup.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1213 (40001) at line 4188: Deadlock found when trying to get lock; try restarting transaction
- I dont know why it keeps that “Deadlock” error. With options in mysqldump command, it must not lock any table and it is supposed to restore line by line from dump file.
- Is it possible to use xtrabackup to generate backup then restore to my new Clusters ? How can I do that ?
Thank you very much.