Background

There are two ways to initialize a Slave-DB from a running Master-DB server. You can either launch a new Slave-DB that will automatically initialize with the running Master-DB at boot time or manually initialize a Slave-DB with the Master-DB by running an operational script.

When you initialize a Slave-DB from a Master-DB, new EBS volumes are created from the most recent backup snapshots of the database. By default, the most recently completed snapshots will be used (regardless of whether they are backups from a master or slave).

New volumes will be created from the chosen snapshots and mounted to the new Slave-DB. The contents of the Master-DB will then be copied over to the Slave-DB. Once all of its contents are in-sync with the master, replication will become active.

For complete details about how to set up a Slave-DB from a Master-DB for the first time, find the appropriate MySQL Database Setup tutorials.

Steps

Automatically Initialize a Slave-DB (at boot time)

Go to your Deployment (Manage -> Deployments).

Make sure you have an running Master-DB server and a completed backup, where the status of the Snapshots are 100% complete.

Find the server that you want to become a "slave" instance of the Master-DB and click the Launch button.

Make sure the INIT_SLAVE_AT_BOOT input is set to True so that the new slave instance will automatically initialize with the master when launched.

When the server enters the operational state, the Slave-DB will be initialized and will be replicating from the Master-DB.

What feedback to expect

The Events pane will highlight the progress of the operation. Click on the link to view a detailed output of the action that can be used to troubleshoot the cause of a failure, if necessary.

Manually Initialize a Slave-DB

Typically you will configure a Slave-DB so that it automatically initializes with the Master-DB at boot time (INIT_SLAVE_AT_BOOT = True). However, perhaps you've launched a database server a different way (INIT_SLAVE_AT_BOOT = False). Follow the steps below to initialize the running database server so that it becomes a Slave-DB of the Master-DB.

Go to your Deployment (Manage -> Deployments).

Click the nickname of the running database server that you want to become a "slave" instance of the Master-DB.

Under the Scripts tab, run the DB EBS slave init operational script to make the current server a Slave-DB of the Master-DB. By default, the most recent backup snapshots will be used to create the stripe on the server. Once the server is initialized, it will start to replicate from the Master-DB.

What feedback to expect

The Events pane will highlight the progress of the operation. Click on the name of an action in the pane to view a detailed output of the action that can be used to troubleshoot the cause of a failure, if necessary.