Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restore only one database in an AWS RDS Sql Server instance

If there is corruption in one database in an AWS sql server RDS instance, what is the best way to restore that one database? The backups are of the whole instance so you wouldn't want to restore from AWS backups and lose data on the other good databases.

like image 798
user1473443 Avatar asked Oct 13 '15 16:10

user1473443


2 Answers

When you restore from an RDS snapshot, you will create a new RDS instance. You do not restore "into" an existing RDS instance.

So you would restore the full RDS instance and use it to:

  1. replace the "old" instance (all databases), or
  2. pull the single database you want from the restored RDS instance and copy it's data to the original RDS instance.

If you are that concerned about individual databases, then you could keep the individual databases on their own RDS instances.

like image 151
Matt Houser Avatar answered Oct 13 '22 13:10

Matt Houser


I believe it is now possible to restore an individual database to the same instance. The process is described here https://www.sqlshack.com/recover-data-in-aws-rds-sql-server/. Automated backups use storage volume snapshots, so I don't think it would work in that scenario.

like image 22
FrugalShaun Avatar answered Oct 13 '22 13:10

FrugalShaun