1. How To Setup a Replication Slave With TwinDB Backup Tool

How To Setup a Replication Slave With TwinDB Backup Tool

MySQL Replication

Setting up a replication slave is pretty straightforward, yet cumbersome process that needs a lot of attention to detail. Even if at first glance the six steps are simple, together they constitute something that is everything but easy to grasp.

What’s Our Solution

We decided to fix that. As a result, our very own TwinDB Backup tool can take backups, restore them, copy files over the network. If we put that together we can get a one line command to fire up a replica from a live master. And we did it in the recent TwinDB Backup release.

How Does It Work

To clone a server, twindb-backup runs XtraBackup on the Master. It streams the backup copy directly to the Slave.

To transfer files over the network, it starts a netcat server on the Slave on a TCP port 9990 by default.

After the copy lands on the Slave, twindb-backup applies the XtrbaBackup redo log, fixes server_id, starts MySQL, and finally configures the replication.

Now this is what I call simple.

However, the most useful application of this feature probably comes with the twindb-backup python module.

In addition, the module can be used in your MySQL automation framework.

So, check it out and let us know what you think. We distribute twindb-backup packages via TwinDB Software Repository. As always, the source code is on GitHub.

Previous Post Next Post