patternsqlMajor
What is the recommended way to backup a MySQL/Amazon RDS database to S3?
Viewed 0 times
thewhatrecommendedwaydatabasemysqlamazonrdsbackup
Problem
I have two purposes for this:
Currently it does not appear that Amazon supports either of these two use cases out of the box.
I have seen mysqldump and xtrabackup (see form post) mentioned.
I have also seen a more complicated process (documented here)
Tips and suggestions are appreciated.
- To have an offsite backup in case of a region wide problem with Amazon Web Services.
- To copy production data from a production billing account to a beta billing account.
Currently it does not appear that Amazon supports either of these two use cases out of the box.
I have seen mysqldump and xtrabackup (see form post) mentioned.
I have also seen a more complicated process (documented here)
- A new RDS server in the source billing account (prod) is spun up off a recent backup.
- A new EC2 instance is spun up that has access to the RDS server in step 1.
- mysqldump is used to make a backup of this database.
- Backup is copied to an offsite location (S3?).
- In a separate account and/or region, a fresh RDS server is spun up.
- Database dump is imported.
Tips and suggestions are appreciated.
Solution
The recommended way to back up RDS is with automatic backups and DB snapshots. DB snapshots are basically the same as EBS snapshots, which are stored in S3 behind the scenes, but are only available within the same region.
If you need cross-region fault tolerance (good plan!), there is no way to restore your data in another region without doing it "the hard way" from a mysqldump. Your alternatives are to back up using mysqldump (slow and terrible for any reasonable sized dataset), or set up your own EC2-based slave in another region and back that up using any available method (xtrabackup, EBS snapshots, etc). However, then you are back to managing your own MySQL instances, so you might as well abandon RDS entirely.
For my money, RDS provides absolutely no benefits in really any way and a whole lot of disadvantages in performance, flexibility, and reliability. I would ask yourself what value RDS provides to you.
If you need cross-region fault tolerance (good plan!), there is no way to restore your data in another region without doing it "the hard way" from a mysqldump. Your alternatives are to back up using mysqldump (slow and terrible for any reasonable sized dataset), or set up your own EC2-based slave in another region and back that up using any available method (xtrabackup, EBS snapshots, etc). However, then you are back to managing your own MySQL instances, so you might as well abandon RDS entirely.
For my money, RDS provides absolutely no benefits in really any way and a whole lot of disadvantages in performance, flexibility, and reliability. I would ask yourself what value RDS provides to you.
Context
StackExchange Database Administrators Q#11396, answer score: 24
Revisions (0)
No revisions yet.