Aug 18, 2011
tom

How to create a local backup of a remote Amazon RDS MySQL database?

Question

How do I create a local backup of a remote Amazon RDS MySQL database? What I need to know is how to make a complete full local backup of a MySQL database (not a remote Amazon snapshot) that can be used to restore to a new database anywhere, on any MySQL server (same version of course).

NOTE: I know how to import data from a flat file via MySQL. Here is how I connect:

mysql -h mydb.xxxxx.us-east-1.rds.amazonaws.com -u myuser -P 3306 -p

Here is how I load a single database table:

mysql> LOAD DATA LOCAL INFILE 'C:/Temp/t1.tab' INTO TABLE t1 LINES TERMINATED BY 'rn';

Answer

mysqldump -h mydb.xxxxx.us-east-1.rds.amazonaws.com -u myuser -P 3306 -p > rds.sql

Related posts:

  1. Why can’t I connect to Amazon RDS after setting it up?
  2. Can’t authorize a server for Amazon RDS
  3. What is the data integrity of Amazon RDS? Do I need to make automated backups to S3?
  4. Does Amazon RDS support multiple databases per instance?
  5. How different is an Amazon EC2 RDS DB Instance different from the normal EC2 Instance?

Leave a comment