- Two AWS RDS MySQL databases - moving databases from source to destination.
- Both databases are not publicly accessible, only via an EC2 instance(s) - e.g. you have setup your security groups.
- Can SSH to a target EC2 instance (but of course).
- Sets up two SSH port forwards on local machine - one to source database, another to target.
- Via calls to
transferDatabase()
:- Drops and recreates each given database.
mysqldump
of source database which is piped intomysql
client connection to destination.
- Drops SSH port fowards.
- Done!
Note: MySQL users and permissions are not copied.
wanted to ask if you've done any sort of benchmarking. How long does it take for say 100M or 1G of data-set. It depends on type of disk and other DB resources but it can give a rough idea