Migrating a giant production database without downtime Migrating a giant production database without downtime database database

Migrating a giant production database without downtime


I don't know if this is possible with the hosting options you are using, but I would tackle the problem this way:

  1. Copy the data to the new server (and record the binary log position on the old database server)
  2. Turn on replication from the old server to the new server (and wait for it to catch up)
  3. Reconfigure the Rails application to point to the new server

Read only mode is another potential option if a "write downtime" is more acceptable than a "full downtime" (depends on the application obviously).