Table of Contents

Database Rollback

Background

When a Master database fails or inappropriate data is populated into the Master during production deployments, a replicated slave can be “promoted” as Master to take over it.

Steps to do

Application Database Configuration

production:
  adapter: mysql
  encoding: utf8
  database: cbprod
  username: cbpuser
  port: 3306
  password: ***
  host: 10.166.152.12
  pool: 23

production_slave_database:
  adapter: mysql
  encoding: utf8
  database: cbprod
  username: cbpuser
  port: 3306
  password: ***
  host: 10.166.152.13
  pool: 23