Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restoring an RDS Instance to a backup/snapshot

I'm trying to RESTORE an RDS instance to one of it's previous backups/snapshots, but when I follow the provided instructions by Amazon it CREATES a new instance from the backup instead of restoring the existing one.

I would like to just restore the db to an existing state because I have an EC2 instance pointing to it (managed through a Load Balancer) that I'd prefer to not have to go in and point to the new RDS.

How can I restore an RDS instance back to a previous point in time AND NOT create a new instance from the backup/snapshot

like image 362
BlondeSwan Avatar asked Oct 25 '25 05:10

BlondeSwan


2 Answers

Restore to new RDS instance. Then rename or original rds server to something else and apply change immediately. Once the change is processed (2-3 min), rename the restore instance to the same name as the original rds and apply immediately.

RDS dns name within single account only varies by initial part, which is taken from the RDS instance name.

like image 196
Tomek Klas Avatar answered Oct 26 '25 18:10

Tomek Klas


Short answer is you can't:

You can't restore from a DB snapshot to an existing DB instance; a new DB instance is created when you restore.

from here:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromSnapshot.html

like image 20
E.J. Brennan Avatar answered Oct 26 '25 18:10

E.J. Brennan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!