I have a running setup of Percona MySQL 5.7. I would like to try out Percona XtraDB cluster. The current data size is ~500GB. From what I've observed (seen in a couple of YouTube videos: https://www.youtube.com/watch?v=uUVdte3wB3I ), I reckon that the cluster members do the initial sync from the currently serving master. However, in my case, syncing 500 GB of data would take ages, which I can't afford. On the other hand, I have a backup of the current data, taken using percona-innobackupex. Can I use this backup to seed the cluster members (like I would feed the slave while doing master-slave replication) so that the initial sync takes less time?
Yes you can.
- For do this first start XtraDB Cluster on current server.
- Then create an incremental backup from current full backup with --galera-info switch.(It's very important to use --galera-info)
- Install Percona server in second server
- Prepare the backup files (both backups.Full and Incremental) on second server
- Open xtrabackup_galera_info file in your full backup directory and copy uuid and seqno (for example e0d744f3-c88a-11e6-ad0d-6ed1e3c29e6d:0)
create grastate.dat file in full backup directory and add the following lines
Back up is ready to be copied over to the MySQL data directory.
Stop mysql service
Delete all contents in /var/lib/mysql
copy-back prepare backup
innobackupex --copy-back /restore/full
chown mysql directory to mysql.mysql
Config galera variables in my.cnf
You can find more information in this topic: