Amazon Relational Database Service
User Guide

Support for Native Backup and Restore in SQL Server

By using native backup and restore for SQL Server databases, you can create a full backup of your on-premises database and store the backup files on Amazon S3. You can then restore to an existing Amazon RDS DB instance running SQL Server. You can also back up an RDS SQL Server database, store it on Amazon S3, and restore it in other locations. In addition, you can restore the backup to an on-premises server, or a different Amazon RDS DB instance running SQL Server. For more information, see Importing and Exporting SQL Server Databases.

Amazon RDS supports native backup and restore for Microsoft SQL Server databases by using full backup files (.bak files).

Adding the Native Backup and Restore Option

The general process for adding the native backup and restore option to a DB instance is the following:

  1. Create a new option group, or copy or modify an existing option group.

  2. Add the SQLSERVER_BACKUP_RESTORE option to the option group.

  3. Associate an IAM role with the option. The IAM role must have access to an S3 bucket to store the database backups.

    That is, it must have as its option setting a valid Amazon Resource Name (ARN) in the format arn:aws:iam::account-id:role/role-name. For more information, see AWS Identity and Access Management (IAM).

  4. Associate the option group with the DB instance.

After you add the native backup and restore option, you don't need to restart your DB instance. As soon as the option group is active, you can begin backing up and restoring immediately.

To add the native backup and restore option

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Option groups.

  3. Create a new option group or use an existing option group. For information on how to create a custom DB option group, see Creating an Option Group.

    To use an existing option group, skip to the next step.

  4. Add the SQLSERVER_BACKUP_RESTORE option to the option group. For more information about adding options, see Adding an Option to an Option Group.

  5. Do one of the following:

    • To use an existing IAM role and Amazon S3 settings, choose an existing IAM role for IAM Role. If you use an existing IAM role, RDS uses the Amazon S3 settings configured for this role.

    • To create a new role and configure new Amazon S3 settings, do the following:

      1. For IAM Role, choose Create a New Role.

      2. For Select S3 Bucket, either create an S3 bucket or use an existing one. To create a new bucket, choose Create a New S3 Bucket. To use an existing bucket, choose it from the list.

      3. For S3 folder path prefix (optional), specify a prefix to use for the files stored in your Amazon S3 bucket.

        This prefix can include a file path but doesn't have to. If you provide a prefix, RDS attaches that prefix to all backup files. RDS then uses the prefix during a restore to identify related files and ignore irrelevant files. For example, you might use the S3 bucket for purposes besides holding backup files. In this case, you can use the prefix to have RDS perform native backup and restore only on a particular folder and its subfolders.

        If you leave the prefix blank, then RDS doesn't use a prefix to identify backup files or files to restore. As a result, during a multiple-file restore, RDS attempts to restore every file in every folder of the S3 bucket.

      4. For Enable Encryption, choose Yes to encrypt the backup file. Choose No to leave the backup file unencrypted.

        If you choose Yes, choose an encryption key for Master Key. For more information about encryption keys, see Getting Started in the AWS Key Management Service (AWS KMS) documentation.

  6. Choose Add option.

  7. Apply the option group to a new or existing DB instance:

Modifying Native Backup and Restore Option Settings

After you enable the native backup and restore option, you can modify the settings for the option. For more information about how to modify option settings, see Modifying an Option Setting.

Removing the Native Backup and Restore Option

You can turn off native backup and restore by removing the option from your DB instance. After you remove the native backup and restore option, you don't need to restart your DB instance.

To remove the native backup and restore option from a DB instance, do one of the following: