Restore options - AWS Prescriptive Guidance

Restore options

The following sections provide two database restore options for SQL Server on Amazon Elastic Compute Cloud (Amazon EC2), when your backups are on premises.

Using Amazon S3

This SQL Server database restore approach uses Amazon Simple Storage Service (Amazon S3) commands for the AWS Command Line Interface (AWS CLI) or the Amazon S3 API to upload the backup files directly to an S3 bucket.

Using Amazon S3 to restore your SQL Server database

The process consists of these steps:

  1. Create an S3 bucket (or use an existing bucket) to store the backup files, and transfer backup (.bak) files from your on-premises database to the S3 bucket by using the AWS CLI or Amazon S3 API.

  2. Deploy SQL Server on an EBS-optimized EC2 instance, using a SQL Server Amazon Machine Image (AMI). This AMI must contain EBS volumes that are configured with an OS partition, a DATA partition, a LOG partition, tempdb (NVMe) storage, and scratch space.

  3. (Optional) Attach a non-root EBS volume to the EC2 instance.

  4. Copy the backup files to the non-root EBS volume.

  5. Restore the backup files from the EBS volume to SQL Server on the EC2 instance.

  6. Use SQL Server management tools to manage your database.

Using AWS DataSync and Amazon FSx

This SQL Server database restore approach uses AWS DataSync to transfer the backup files to Amazon FSx for Windows File Server.

Using DataSync and Amazon FSx to restore your SQL Server database

The process consists of these steps:

  1. Deploy SQL Server on an EBS-optimized EC2 instance with attached NVMe, using an AMI that contains EBS volumes configured with OS, DATA, LOG, and tempdb. (For example, you can use the memory optimized r5d.large instance class.)

  2. Use FSx for Windows File Server to create a file server. This can be used as a temporary storage location to download SQL Server backup (.bak) files from your on-premises environment.

  3. Create an DataSync endpoint and agent for the Amazon FSx file server.

  4. DataSync automates data synchronization between your on-premises storage and the Amazon FSx file server without requiring Amazon S3.

  5. Restore the backup files from the Amazon FSx file server to SQL Server on the EC2 instance.

  6. Use SQL Server management tools to manage your database.

Note

Amazon EC2 offers Microsoft SQL Server on Microsoft Windows Server AMIs for multiple SQL Server editions.

Using Amazon S3 File Gateway

You can use Amazon S3 File Gateway to store native SQL Server backups to Amazon S3, as illustrated in the following diagram. Alternatively, there are tools such as Commvault and LiteSpeed that help you manage file-level backups at scale and store them directly in Amazon S3. You can also use a tool such as SIOS DataKeeper for backup/recovery and DR configuration.

Using S3 File Gateway to restore your SQL Server database

The process consists of these steps:

  1. Data is written on the file gateway’s local cache disk.

  2. After the data is safely persisted to the local cache, the file gateway acknowledges the completion of the write operation to the client application.

  3. The file gateway transfers data to the S3 bucket asynchronously. It optimizes data transfer and uses HTTPS to encrypt data in transit.

  4. After data is uploaded to the S3 bucket, it stays in the file gateway’s local cache until it is evicted.