If you have a backup of an RDS SQL Server instance, you can restore the data to an existing instance or a new one. This is useful for recovering from operational errors or analyzing historical data.
This topic describes how to restore data to an instance in the same region. To restore data across regions or restore RDS backup files to a self-managed database, see Overview of restoration solutions to select an appropriate method.
Limitations
-
If an instance is in the simple recovery model, it does not back up transaction logs. Therefore, you can only restore data from a backup set and cannot perform a point-in-time recovery.
-
When restoring from a backup set, you cannot restore an instance in the simple recovery model to a High-Availability Edition, shared-specification, or Cluster Edition instance.
-
If an instance has the Data Archiving to OSS feature enabled, you can restore only the databases in the backup set that are not in cold storage. If a database is moved to cold storage, the restored instance does not include that database.
-
Backups of a Serverless instance can only be restored to a new Serverless instance, not an existing one.
-
Direct restoration is not supported for RDS SQL Server 2008 R2 instances that use high-performance local disks. To restore data from this instance version, you must use a temporary instance.
-
If TDE is enabled, backups can only be restored to a new instance.
Restore to an existing instance
You can restore a backup of an instance to a specified existing instance, including the source instance. You can restore from a backup set or to a specific point in time. You can restore all databases or a subset.
Restoration rules
|
Requirement |
Description |
|
Database version |
The database version of the destination instance must be the same as or later than the version of the source instance. |
|
Instance series |
You cannot restore an instance of a higher series to a lower series. The series are ordered from highest to lowest: Cluster Edition > High-Availability Edition > Basic Edition. |
|
Instance type |
You can restore an instance only to another of the same type, or between General-purpose and Dedicated types. |
Procedure
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Backup and Restoration, and then click Restore Database.
-
In the dialog box that appears, select Restore to Existing Instance and click OK.
-
Configure the following parameters, and then click OK.
Parameter
Description
Restore Method
-
By Backup Set: Restores data from the selected backup set.
-
By Time: Restores the instance to a specific point in time within the log backup retention period. The system uses the most recent full backup and subsequent incremental backups to perform the restoration. You cannot restore from a specific incremental backup. You can view or modify the log backup retention period as needed.
Restoration Time
This parameter is visible when Restore Mode is set to By Time. Select the point in time to which you want to restore.
Backup Set
This parameter is visible when Restore Mode is set to By Backup Set. Select the backup set to restore.
More Backup Sets
If the target backup set is not listed in the Backup Set dropdown, select this option to search for more.
Destination Instance Name
Select the destination instance for the restoration. You can restore to an instance with a later database version. By default, the system lists all instances in the current region under your account, including the source instance.
Note-
A snapshot backup can only be restored to an instance that has snapshot backup enabled.
-
You cannot restore backups between shared-specification instances and General-purpose or Dedicated instances.
-
If too many destination instances are displayed, use the search box to filter the list.
Databases to Restore
-
Select the databases to restore. You can restore some or all databases. By default, all databases in the instance are listed.
-
Set the names for the restored databases. By default, the original database names are used. Important:
-
The restored database name must be unique on the destination instance. Duplicate names will cause the restoration to fail.
-
If you provide a unique name for the restored database, a new database is created without affecting existing data on the destination instance.
-
Restored database names can contain only uppercase letters, lowercase letters, digits, underscores (_), and hyphens (-).
-
-
-
Monitor the restoration progress.
The system creates a restoration task. Click Tasks in the upper-right corner. On the Tasks page, filter the tasks by Task Type and select Clone Instance to view the progress.
The restoration is complete when the Task Status is Succeeded and the Progress is 100%.
Restore to a new instance
You can restore a backup of an instance to a new instance from a backup set or to a specific point in time. The restoration can include all databases or a subset of databases. For information about the time required to restore to a new instance, see FAQ in this topic.
Billing
Restoring data to a new instance creates a billable instance. You can review the fees during the creation process.
-
If you no longer need the source instance after the restoration, release or unsubscribe from the source instance promptly to avoid unnecessary charges.
-
Billing for the new instance starts upon creation.
Procedure
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Backup and Restoration, and then click Restore Database.
-
In the Select Restore Method dialog box that appears, select Restore to New Instance and click OK.
-
On the Restore Database page, configure the following parameters.
Category
Description
-
Subscription : A prepaid method where you pay upfront. This is suitable for long-term needs and is more cost-effective than pay-as-you-go. The longer the subscription period, the greater the discount.
-
Pay-As-You-Go: A postpaid method where you are billed hourly. This is suitable for short-term needs. You can release the instance at any time to save costs.
Restore Mode
-
By Backup Set: Restores data from the selected backup set.
-
By Time: Restores the instance to a specific point in time within the log backup retention period. The system uses the most recent full backup and subsequent incremental backups to perform the restoration. You cannot restore from a specific incremental backup. You can view or modify the log backup retention period as needed.
Database
You can restore all or some databases. When you select Part, you must manually enter the database names and separate them with a comma (,).
NoteIf snapshot backup is enabled for an instance, you can restore only All databases. You cannot restore Part databases.
Edition
The available series vary by region and database version. The available options are shown in the console. For more information, see Supported series.
Storage Type
Select an ESSD cloud disk or a high-performance cloud disk. For more information, see Storage types.
Zone of Primary Node
Select the zone for the primary node of the instance.
NoteBasic Edition instances have only one node and therefore exist in a single zone.
Deployment Method
-
Multi-zone Deployment (Recommended): The primary and secondary nodes are in different zones within the same region to provide cross-zone disaster recovery.
-
Single-zone Deployment: The primary and secondary nodes are in the same zone.
Note-
There is no significant difference between zones in the same region.
-
For optimal performance, create your ECS and RDS instances in the same zone. The performance impact is minimal if they are in different zones within the same region.
-
If you select the Basic Edition, only Single-zone Deployment is supported.
-
If a zone is marked as Sold Out, select another zone.
-
Basic Edition does not support this parameter.
Zone of Secondary Node
If you set the Deployment Method to Multi-zone Deployment, you must select the zone for the secondary instance node.
NoteBasic Edition instances have only one node and therefore do not have a secondary node zone.
Instance Type
The available instance types vary by region and database version. The available options are shown in the console. For more information, see Supported instance types.
Capacity
The new instance's storage capacity must be greater than or equal to that of the source instance.
-
You can view the storage capacity of the source instance on its Basic Information page.
-
Storage capacity includes space for data, system files, log files, and transaction files.
-
-
Click Next: Instance configuration and configure the following parameters.
Category
Description
Network Type
Currently, only VPC is supported. You can create a VPC and a vSwitch as needed.
NoteEnsure that the RDS instance and the ECS instance that needs to connect to it are in the same VPC. Otherwise, they cannot communicate over the internal network.
Resource Group
The resource group to which the instance belongs. You can create a resource group if needed.
-
Click Next: Confirm order.
-
Confirm the Parameter Configuration. Select the Quantity and Duration (for subscription instances only). Then, click Pay Now and complete the payment.
It takes 1 to 10 minutes to create the instance. Go to the instance list and refresh the page to see the new instance.
-
After the instance is created, connect to the new SQL Server instance to verify the restored data.
Related operations
You can also restore data by using the RecoveryDBInstance API.