The general syntax for MySQL backups using mysqldump tool is
Backup:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name] > rdsdump.sql
Single DB Backup:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name1] > db1dump.sql
Multiple DB Backups:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name1] [database_name2] > db1db2dump.sql
All DB Backups:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] --all-databases > alldbdump.sql
Dump of specific table:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name] [table_name] > db_table_name_dump.sql
Restore from dump:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name] < rdsdump.sql
Backup:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name] > rdsdump.sql
Single DB Backup:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name1] > db1dump.sql
Multiple DB Backups:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name1] [database_name2] > db1db2dump.sql
All DB Backups:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] --all-databases > alldbdump.sql
Dump of specific table:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name] [table_name] > db_table_name_dump.sql
Restore from dump:
$mysqldump -h [RDS instance info] -u [rds_user_name] -p[rds_ password] --socket=[if_different_from_default] -P=[port_if_different_from_3306] [database_name] < rdsdump.sql
I use this and it works famously: http://sourceforge.net/projects/automysqlbackup/ it even encrypts as well. You just need to create a restore script is all.....
ReplyDelete@Paul Roesler, Thanks for the link, will check it out. Meanwhile, have you tried - http://www.percona.com/software/percona-xtrabackup?
Delete