Hi folk! I’ve got and XtraDB Cluster running with two DB servers and one Galera arbitrator. I am not running in true dual master – as I have a VIP that only points to one of the two DB servers. (still gunshy about that and haven’t needed it) So for all practical purposes it’s a master/slave setup but fully capable of doing dual master.
So, I’m using xtrabackup with Bareos to perform regular nightly backups and that’s been working great. However I’m running into some isms when I’m attempting to perform a restore. In this case, I’m only aiming to restore a single table, and not to it’s original location. I do backups and restores from the slave of the cluster.
What I’m doing is:
- Prepare the restore with it’s incrementals
- Recreate the table on the slave in a “bareos_restores” db that I have created, using the .frm file pulled from the restore and dbsake
- Hop onto the slave, and discard the tablespace of the table I just created
- Copy the .ibd file (and really whatever else aside from the .frm, but all I have in this case is a .ibd file) into place with the new table name
- Back on the slave, import tablespace
- Yay! the slave is looking good
Ok so here’s where thing get complicated. The slave now has a properly restored copy of the table. The master does not. It has an empty table from when I did the create table in step 2, but no data has made it in after the import tablespace.
So, ok, guessing xtradb cluster doesn’t acknowledge the import tablespace. So I went looking for a solution and came across pt-table-sync. I attempted to pt-table-sync from slave to master. Well as you can probably imagine, that only sort of worked, as it ended up causing a wsrep deadlock.
So I’m not real sure how to proceed from here. I need the table to be sync’ed after import tablespace. Any ideas?
One thing I will mention is that I am not explicitly setting innodb_import_table_from_xtrabackup or innodb_expand_import. I am not fully clear on what the benefit of that is. Also I’m running the latest XtraDB Cluster 5.7 series.
Thanks! I’m hoping either I can get some pointers or something will magically come to me soon. =)