Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon RDS: Restore snapshot to existing instance

I have created a snapshot of my instance and made some unwanted changes in DB.

Now I want to restore my instance from this snapshot.

When I try to do it - it creates me one more instance, additionally to the one I have.

I specify "DB Instance Identifier" and after that I get two instances with the same ID.

So my question: Is there any way to restore snapshot to existing instance?

Because in other case - new instance is created with differrent endpoint (hostname) and I need to change my configs to access database. Or there is a better way to manage such cases?

like image 527
SmxCde Avatar asked Jun 18 '14 06:06

SmxCde


People also ask

How do I transfer my RDS snapshots to another AWS account?

Choose Snapshots from the navigation pane. From the Snapshots pane, choose the Shared with Me tab. Select the DB snapshot that was shared. Choose Actions, and then choose Copy Snapshot to copy the snapshot into the same AWS Region and with a KMS key from the target account.

What happens to your manually created DB snapshots after you delete the RDS instance from which these snapshots were created?

When a DB instance is deleted, a final DB snapshot can be created upon deletion; which can be used to restore the deleted DB instance at a later date. RDS retains the final user-created DB snapshot along with all other manually created DB snapshots. all automated backups are deleted and cannot be recovered.


1 Answers

No you can't restore back your existing DB instance to any of the either manual backup or point-in-time snapshot.

The only way you can make use of the manual backup or automated snapshot is to create a new RDS DB instance using that. Once the new DB instance is created, you can change the endpoint of DB in your app / code and delete the old DB instance.

Bottomline : You have to change the config settings in your app. No other option.

like image 101
Naveen Vijay Avatar answered Nov 15 '22 23:11

Naveen Vijay