Hello I have a linux bastion host in AWS that I am able to SSH into. In the Bastion I am able to run a mysqldump
command which makes a copy of an RDS instance. What I want to accomplish is being able to make a copy of a specific RDS snapshot. When I run the mysqldump
command the copy is properly made but it returns the latest RDS data.
The original command I ran (which works) is something like:
mysqldump -u johnDoe -p -h my-rds-endpoint.rds.amazonaws.com --single-transaction <my-db-name> > /tmp/testData.sql
Is there a way to use this same command to return specific snapshot data. Sort of like:
mysqldump -u johnDoe -p -h <rds-snap-shot-arn-here> --single-transaction <my-db-name> > /tmp/testData.sql
Is this possibly using either the arn
or the DB snapshot name
?
Thank you.
Answer: No, if you want to use mysqldump on the snapshot, you should create it as an instance first.
You can also restore it as an instance from CLI/API and wait until completed, after you get the db host, you could use mysqldump to that snapshot. Here is the reference : https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromSnapshot.html