Migrating mySQL to EBS
15 Oct 2010 by Misha Dragojevic
This document explains how to migrate your existing Amazon EC2 mySQL DB to EBS storage.
You must have “EC2 API command line tools”, XFS file system utilities and mySQL server installed on your system.
Step 1: Install necessary software
On Ubuntu / Debian:
Make note of your "instance_id". *Step 2*: Create and attach EBS volume Create EBS volume:Make note of “volume_id” returned.
Make sure volume is ready:
Step 3: Format file system, mount EBS
Create XFS file system:
You can now use EBS for mySQL.
NOTE: to make sure file system is mounted after reboot, you need to change /etc/fstab by adding the following line:
Move mySQL files to EBS:
Mount EBS volume:
You have mySQL DB running on Amazon EBS volume!
Next step is to make sure you do a regular snapshots.