A prepackaged Aspera Faspex On Demand (FOD) instance runs Faspex MySQL database on local host. However, you can run Faspex MySQL database on a remote host such as a RDS instance. This article provides instructions on how to migrate your current Faspex database to a AWS RDS instance and use RDS to host Faspex database.
This article assumes the following:
- You have purchased and booted up Aspera Faspex On Demand v.3.5.6 or higher
- You can SSH as root to your Aspera On Demand Instance
- You have user permissions to create RDS instances and security groups.
- You know how to create RDS instances.
1) Create RDS instance with MySQL 5.5.42 or earlier
Make sure that security group(s) are setup to allow your FOD instance to connect to your RDS instance. Please note the following:
- The default port for MySQL in RDS is set to TCP/3306 (you will need this later).
- You need to create a security group such that your Faspex server can access the RDS instance
- Use MySQL 5.5.42 or earlier on your RDS instance.
2) Stop Faspex services and back up database
SSH into your FOD instance and perform the following.
# asctl faspex:stop
# asctl faspex:backup_database
3) Migrate Faspex database to RDS
From your FOD instance migrate your Faspex database into your RDS instance.
# /opt/aspera/common/mysql/bin/mysql -h [host IP] -P [port number] -u [user] -p[password] < /full/path/of/your/backup/database
# /opt/aspera/common/mysql/bin/mysql -h 184.108.40.206 -P 3306 -u root -ptopsecret < /opt/aspera/faspex/backup/2015-07-01_234548/faspex.sql
4) Validate that migration is successful
To confirm that the data has been migrated, you should login to the RDS database and view the contents of the new database
# /opt/aspera/common/mysql/bin/mysql -h 220.127.116.11 -P 3306 -u root -ptopsecret
mysql> use faspex;
mysql> show tables;
mysql> select * from e_packages;
5) Configure Faspex to use this RDS database
Edit the following files to reflect the information of your RDS instance
You will need to update the hostname, port, and password in this file.
In the 'production' section you need to update the port, host and password settings.
6) Shut down the local MySQL server, and restart all other Faspex services.
# asctl mysql:disable
# asctl all:restart
NOTE: If you need to re-enable the MySQL service, first revert the YML files back and then run the command 'asctl mysql:setup'.