I have observed that when people start a WordPress website they generally put the complete architecture (Database and App Server) on one server. Once they reach a certain load they have to either vertically scale the server and keep on spending money to this architecture. I have been always fostering about Highly Salable Architectures so one of my solutions to a client was to move their Database to Amazon RDS and then enable snapshots over there. In order to move the database the first request was to create a snapshot of the database and then update restore the new database with the snapshot. In order to do that following two commands are quite handy.
- Create a Database Dump using the following command
- > mysqldump -h server_one_endpoint -u username -p database_name > dump.sql
- Restore the database dump to your RDS using following command
- > mysql -h xyz.region.rds.amazonaws.com -u username -p database_name < dump.sql
More information about the mysqldump utility can be found here.
To downloaded MySQL database from here.