Note: Please go to to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > ServerTemplates > Archive > 11H1 > Runbooks > Database Manager for MySQL Stripe Runbook > MySQL Stripe Recipes > Promote Slave-DB to Master-DB

Promote Slave-DB to Master-DB


To promote a Slave-DB so that it becomes the new Master-DB.  For best practices, you should run this script on a Slave-DB that is currently connected to a running Master-DB.


Table of Contents


Performing a Slave-to-Master promotion involves syncing up DB contents, switching DNS entries and creating a backup (set of snapshots) of the new Master-DB's EBS stripe.  After the promotion is complete, the new Master-DB will swap DNS entries with the previous Master-DB and the previous Master-DB will become a slave of the new master. (i.e. The servers will switch roles.)


  1. Go to your Deployment (Manage -> Deployments).  In order to perform the following step, there should be operational Master-DB and Slave-DB servers.
  2. Click the nickname of the MySQL-EBS "slave" instance that you want to make the new Master-DB.
  3. Under the Scripts tab, run the "DB EBS promote to master" operational script to perform the following actions:
    • Updates the 'master' A Record with your DNS provider with the private IP address of the server that's being promoted to become the new Master-DB.  Both the application and 'slave' database servers will use the DNS name to connect to the Master-DB.
    • Updates the 'slave' A Record with your DNS provider with the private IP address of the server that was previously the Master-DB, but is now the Slave-DB.
    • The previous 'slave' becomes the new 'master' and the previous 'master' becomes the slave of the new 'master'.
    • Initiates a backup of the new Master-DB.
  4. Wait for the backup to be completed. All of the backup snapshots of the new Master-DB must be 100% complete before launching any new slave instances. But at this point, you probably don't need to launch a new slave because you should already have a redundant MySQL setup with operational master and slave database servers.
  5. If you are running a Rails application, restart all of the mongrels so that they will point to the new DNS entries and resolve to the correct server.

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.

You must to post a comment.
Last modified
08:41, 16 Jul 2013



This page has no classifications.



© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.