Steps to Enable Clustrix to Clustrix Replication

Rupert Harwood -

Setting up replication with ClustrixDB is quite simple. Detailed information on configuring replication can be found in our documentation. Please See Configuring Replication.

Steps to enable replication

  1. Enable binlog(s) on the master cluster
  2. Run ClustrixDB Fast Backup on the master cluster
  3. Restore the backup to the slave cluster
  4. Create a slave on the slave cluster

Enable binlog(s) on the master cluster

On the master cluster create a binlog or binlogs, depending on your needs. 

CREATE BINLOG 'binlogname' FORMAT = 'row';

For detailed information on creating binlogs please see: Using ClustrixDB as a Replication Master

Run ClustrixDB Fast Backup on the master cluster

Run the ClustrixDB Fast Backup on the master cluster. This should only be done after enabling binlogs or you will not have the binlog position for step 4.

BACKUP * TO 'ftp://username:password:/full/path/to/backup_file';

For detailed information on backup please see: ClustrixDB Fast Backup/Restore

Restore the backup to the slave cluster

From the slave cluster, initiate the restore command. Restore ether the entire backup, or just the tables that you are planning to replicate.

RESTORE db.table FROM 'ftp://username:password:/full/path/to/backup/file';

For detailed information on restore please see: ClustrixDB Fast Backup/Restore

Create a slave on the slave cluster

Create the slave using the exact binlog file and position supplied inside the backup file. Navigate to the backup file and view the contents of the metadata/binlogs file.

[root@ftpserver backup_file]# cat metadata/binlogs
clx-bin.000001:000004
clx-dev.005702:89363985

Once you have the binlog file and position you can create the slave.

create slave 'clx-slave01'
master_log_file = 'clx-bin.000001',
master_log_pos = 4,
master_host = '1.2.3.4',
master_port = 3306,
master_user = 'replication';

For detailed information on creating a slave please see: Using ClustrixDB as a Replication Slave

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk