This topic was translated by AI and is currently in queue for revision by our editors. Alibaba Cloud does not guarantee the accuracy of AI-translated content. Request expedited revision

Restore SQL Server data

Updated at: 2025-03-17 18:19

If you have backup data of an RDS SQL Server instance, you can restore the backup data to an existing instance or a new instance. This is suitable for scenarios such as recovering from unintended operations and analyzing historical data.

Note

This topic is applicable for restoring all data to an instance in the same region. For cross-region data restoration or to restore RDS backup files to a self-managed database, refer to Overview of Restoration Solutions for suitable restoration options.

Limits

  • If the instance has the data archiving OSS feature enabled, it can only restore databases that are included in the backup set (non-cold storage databases). Databases that have been moved to cold storage will not be included in the restored instance.

  • Backup data of serverless instances can only be restored to a new serverless instance . Restoration to an existing instance is not supported at this time.

  • RDS SQL Server 2008 R2 instances with local SSD are not supported. To handle data from this version, please restore it using a temporary instance.

Restore to an existing instance

You can restore historical backups of instance A to a specified existing instance (including instance A) by point-in-time or backup set. The restoration scope supports selecting some or all databases.

Restoration rules

Instance Requirements

Description

Instance Requirements

Description

Database Version

The database version of the existing instance must be greater than or equal to the database version of the original instance.

Instance Series

Restoration from a higher series to a lower series is not supported. The series are listed in descending order as cluster series > high availability series > basic series.

Instance Type

Only restoration from the same type to the same type, general-purpose type to dedicated type, or dedicated type to general-purpose type is supported.

Procedure

  1. 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.

  2. In the left-side navigation pane, click Backup and Restoration, and then click Database Restoration .

  3. In the pop-up dialog box, select Restore To An Existing Instance , and then click Confirm.

  4. Set the following parameters, then click Confirm.

    Parameter

    Description

    Parameter

    Description

    Restoration Method

    • By Backup Set: You can restore the data within the selected backup set.

    • By Point-in-time: You can set any point in time within the log backup retention period. The system will restore the data of the specified point in time based on the most recent full backup and incremental backup (restoration of specified incremental backups is not supported). You can view or modify the log backup retention period as needed.

    Restore Time

    Visible when Restoration Method is By Point-in-time. Select the point in time to which you want to restore the data.

    Backup Set

    Visible when Restoration Method is By Backup Set. Select the backup set from which you want to restore the data.

    More Backup Sets

    If you cannot find the target backup set in Backup Set, you can check this option to continue searching.

    Destination Instance Name

    Select the instance to which you want to restore the data. Restoration to a higher version instance is supported. By default, the system displays all the instances created within your Alibaba Cloud account and residing in the selected region, including the original instance.

    Note
    • Snapshot backups can only be restored to instances with snapshot backup enabled.

    • Backups of shared instances cannot be restored to general-purpose or dedicated instances, and backups of general-purpose or dedicated instances cannot be restored to shared instances.

    • If many destination instances are displayed, you can use the search box to filter them.

    Databases To Restore

    1. Select the databases you want to restore. You can restore some or all databases. By default, the system displays all the databases created on the original instance.

    2. Set the name of the restored database. By default, the system uses the original database name. Be sure to note:

      • The name of the restored database cannot be the same as any existing database name in the destination instance. Otherwise, the restoration job will report an error. Please modify it to a unique database name.

      • If the name of the restored database is different from any existing database name in the destination instance, the system will create a new database without overwriting or affecting the original data in the destination instance.

      • The name of the restored database can only consist of uppercase and lowercase letters, numbers, underscores (_), and hyphens (-).

  5. Check the progress of the restoration job.

    The system will generate a restore job. You can click the image.png button in the upper right corner to filter the Task Type as Clone Instance task on the Task Type page to check the recovery progress.

    image.png

Restore to a new instance

You can restore historical backups of instance A to a new instance using either point-in-time or a backup set. The restoration allows you to select either some or all databases. To find out the time needed to restore to a new instance, see FAQ in this topic.

Billing description

Because the data is restored to a new instance, new instance fees will be charged. You can view the fee details when creating the instance.

Note
  • If you no longer need the original instance after restoration, release or unsubscribe from it promptly.

  • Billing starts after the instance is created.

Procedure

  1. 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.

  2. In the left-side navigation pane, click Backup and Restoration, and then click Database Restoration .

  3. In the pop-up Select Restoration Method dialog box, select Restore To A New Instance , and then click Confirm .

  4. On the Database Restoration page, configure the following parameters.

    Category

    Description

    Category

    Description

    Billing Method

    • Subscription: This is a prepaid method, which requires payment when creating a new instance. It is suitable for long-term use. The subscription billing method is more cost-effective than the pay-as-you-go billing method, and the longer the subscription duration, the greater the discount.

    • Pay-as-you-go: This is a postpaid method, which charges by the hour. It is suitable for short-term use. If you no longer require a pay-as-you-go instance, you can release it to reduce costs.

    Restoration Method

    • By Backup Set: You can restore the data within the selected backup set.

    • By Point-in-time: You can set any point in time within the log backup retention period. The system will restore the data of the specified point in time based on the most recent full backup and incremental backup (restoration of specified incremental backups is not supported). You can view or modify the log backup retention period as needed.

    Database

    Supports restoring all or some databases. When selecting Some, you need to manually enter the database names, separated by commas (,).

    Note

    If the instance has enabled snapshot backup, only All databases can be restored. Restoration of Some databases is not supported.

    Product Series

    The supported series vary by region and database version. Please refer to the actual interface.

    Storage Class

    Select ESSD disk or standard disk. For details, see Introduction to Storage Classes.

    Primary Node Zone

    Select the zone where the primary node of the instance is located.

    Deployment Plan

    • Multi-zone Deployment (recommended): The primary node and standby node are located in different zones within the same region, providing cross-zone disaster recovery.

    • Single-zone Deployment: The primary node and standby node are located in the same zone.

    Note
    • There are no substantive differences between different zones in the same region.

    • The performance of accessing an RDS instance in the same zone as the ECS instance is better than accessing an RDS instance in other zones within the same region, but the difference is small.

    • When selecting Basic Series, only Single-zone Deployment is supported.

    • If the upper right corner of the target zone indicates Sold Out, please change the zone.

    Standby Node Zone

    If Deployment Plan is set to Multi-zone Deployment, you need to select the zone where the standby node of the instance is located.

    Instance Type

    The supported specifications vary by region and database version. Please refer to the actual interface.

    Storage Space

    The storage space of the new instance must be greater than or equal to the space of the original instance.

    • You can view the storage space size of the original instance on the Basic Information page of the RDS instance details page.

    • The storage space includes data space, system file space, log file space, and transaction file space.

  5. Click Next: Instance Configuration and configure the following parameters.

    Category

    Description

    Category

    Description

    Network Type

    Currently, only virtual private cloud (VPC) is supported. You can create a VPC and a switch as needed.

    Note

    Ensure that the RDS instance and the ECS instance that you want to connect are in the same VPC. Otherwise, the RDS instance and the ECS instance cannot communicate with each other over the internal network.

    Resource Group

    The resource group to which the instance belongs. You can create a resource group as needed.

  6. Click Next: Confirm Order .

  7. Confirm the Parameter Configuration, select the Purchase Quantity and Subscription Duration (only for subscription instances), agree to the service agreement, and click Proceed To Payment to complete the transaction.

    You can go to the Instance List and find the newly created instance based on the creation time. It takes approximately 1 to 10 minutes to create an instance. You can refresh the page to check whether the instance is created.

  8. You can connect to the new SQL Server instance to check the restored tables.

Related operations

You can also restore data using the API (RecoveryDBInstance).

FAQ

How long does it take to restore data to a new instance?

Estimated time
Example
Restoration suggestions

Generally, the estimated time required to restore data to a new instance is as follows. Note that the following backup and restoration speeds are based on the size of uncompressed data.

Note

Because backup compression is not supported for Web versions of instances, backup efficiency may be affected, and backup and restoration speeds may decrease to less than 100 GB per hour.

Operation

Required

Estimated Time Consumption

Notes

Create and Configure a New Instance

Yes

10 to 15 minutes

The time required varies based on the product series and specifications selected when restoring to a new instance.

Back Up Full Data

Optional

200 GB per hour

  • Because the restoration speed of transaction logs is much lower than that of full data backups, to ensure optimal efficiency of data restoration, if no full backups are performed on the instance within 36 hours, a full backup is performed during the upgrade process to balance the time required for data restoration and the additional full backup.

    We recommend that you manually perform a full backup at an appropriate time before restoration, or initiate a restoration task within 36 hours after the system automatically completes a full backup to reduce the total time required for the restoration process.

  • The backup speed may vary based on the region and time period.

  • To obtain more accurate information about backup and restoration performance, refer to the data volume and time for the last full backup.

Restore a Full Backup on the Destination Instance

Yes

200 GB per hour

None

Back Up Incremental Transaction Logs on the Source Instance

Yes

200 GB per hour

Before and after an incremental log backup, a time loss of 2 minutes may occur. The time loss may be caused by backup preparation, closure, and resource allocation.

Apply an Incremental Transaction Log Backup on the Destination Instance

Yes

200 GB per hour

Before and after an incremental log backup is applied, a time loss of 2 minutes may occur. The time loss may be caused by backup consistency verification.

Restore a Database

Yes

Within 2 minutes

  • Resource consumption: Applying an incremental transaction log is a resource-intensive operation. If many transaction logs are generated for an RDS instance that has small specifications, such as 2 CPU cores and 4 GB of memory, the data restoration speed decreases.

  • Accelerated Database Recovery option: The Accelerated Database Recovery option is supported for RDS instances that run SQL Server 2019 or later. This reduces the time for database restoration. For more information, refer to the Microsoft official documentation to evaluate whether to enable this option.

Test instance: The RDS instance has 4 CPU cores and 8 GB of memory, and the volume of data on the RDS instance is 600 GB.

  • Create and configure a new instance: approximately 12 minutes.

  • Full backup (optional): approximately 3 hours. (600 GB / 200 GB per hour)

  • Restore a full backupon the destination instance: approximately 3 hours. (600 GB / 200 GB per hour)

  • Back up incremental transaction logs on the source instance: approximately 5 minutes. (10 GB / 200 GB per hour) + Time loss of 2 minutes = 5 minutes

  • Apply an incremental transaction log backup on the destination instance: approximately 5 minutes. (10 GB / 200 GB per hour) + Time loss of 2 minutes = 5 minutes

  • Restore a database: within 2 minutes.

In summary, in this example, if no full backups are performed on the instance within 36 hours, the total duration is estimated to be approximately 6 hours and 24 minutes. If a full backup is performed on the instance within 36 hours, the duration is estimated to be approximately 3 hours and 24 minutes.

  • Maintenance window: We recommend that you perform restoration operations during off-peak hours to minimize the impacts on your workloads.

  • Long-running transaction issues: During the restoration process, avoid performing long-running transaction operations, such as creating or reindexing, and data archiving, to avoid extending the time required for the database restoration step.

  • On this page (1)
  • Limits
  • Restore to an existing instance
  • Restoration rules
  • Procedure
  • Restore to a new instance
  • Billing description
  • Procedure
  • Related operations
  • FAQ
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare