Sometimes it becomes necessary to move your database from one environment to another. Common reasons for this include:
- Updating a Testing or Development environment with Production data
- Migrating from one stack version to another (e.g. Stable-v4 -> Stable-v5)
- Upgrading to a newer major version of your database (e.g. MySQL 5.5 -> MySQL 5.6 or Postgres 9.2 -> Postgres 9.4)
- Upgrading storage to Encrypted EBS
- Upgrading the filesystem to EXT4
The traditional method involves three database related steps:
- Creating an on-demand backup in the source environment.
- Downloading the most recent backup in the source environment.
- Transferring and Restoring the backup from the source to the target environment.
This results in some time and processing inefficiency since using
eybackup uploads the backup to s3 and then it needs to be downloaded as a separate operation. For a small database this works just fine; unfortunately, for large databases this extra step could add hours to your migration plan. A better way to approach this would be to use the database-native backup tools to backup the source database to a file, and then transfer that file to the destination for restore.