MSP360 News
Articles, guides, whitepapers and other useful content for MSPs and IT Professionals

Backing Up SQL Server Databases to Amazon S3

If you run Microsoft SQL Server, you may wish to back up your databases to a cloud like Amazon Web Services (AWS). Doing so not only provides you with a virtually infinite amount of backup storage space in the cloud, but it can also make recovery easy in cases where you decide to restore your database using a cloud-based server.

In this article, we explain the main options available to you for backing up SQL Server databases to AWS. In particular, we’ll discuss backing up your data manually from a SQL Server database into S3, backing up data to AWS RDS and, finally, how to perform an image-based backup with the help of CloudBerry Backup.

Table of Contents

    Manually Backing Up SQL Server Databases to S3

    One way to back up SQL Server databases to AWS is to perform a manual backup directly from Microsoft SQL Server to the AWS S3 storage service by following these steps:

    1. Create an S3 storage bucket on AWS.
    2. Configure a user account and permissions to access your storage bucket using IAM.
    3. In SQL Server, export the database that you want to back up into a file.
    4. Upload the exported file to S3. You can do this through the S3 interface, or you could use a tool like PowerShell (see here for details on connecting to an S3 bucket via PowerShell) or CloudBerry Explorer, which lets you move data between local storage and S3 easily.

    Pros and Cons
    The approach described above is a relatively simple and easy way to perform a one-off backup for a SQL Server database to S3. It is also one that you can achieve using only SQL Server and native Windows tools.

    FREE WHITEPAPER
    SQL Server Backup and Recovery
    Check out the ultimate guide with best practices for MSPs:
    New call-to-action
    SQL WP icon

    However, manually backing up SQL server databases to S3 storage has some downsides. The most obvious is that it requires significant manual effort, because you have to export your database and upload it manually. And while you could write a scheduled task in Windows to perform the backups automatically at a regular interval using PowerShell, you can’t automate this task using SQL Server alone.

    Another significant disadvantage of the approach above is that recovering your data from S3 requires you to download the backed-up database file manually, then import the data back into SQL Server (or another database server). That process takes time and requires significant manual effort.

    Manually Backing Up SQL Server Databases to AWS RDS

    Although RDS and Amazon S3 are different services, migration of SQL Server databases to AWS RDS is another approach you might be interested in. RDS is a cloud-based relational database service where you can create databases whose structure closely resembles that of SQL Server databases.

    AWS offers a detailed guide to this approach, so we won’t regurgitate their steps here. We will note, however, the pros and cons of this approach.

    Pros and Cons
    The pros are that this is a SQL Server database backup solution that anyone can perform relatively simply, provided they are familiar with both SQL Server and RDS. The cons are that this approach, like the one described further above, requires a significant amount of manual effort in order to perform the database backup. Further manual effort is necessary to restore data from an RDS database back to Microsoft SQL Server.

    Recurring SQL Server Database Backups to Amazon S3 with CloudBerry Backup

    So far, the backup options we’ve looked at would have to be performed manually each time you want to do backup. If you prefer to back up SQL Server databases automatically on a routine basis, CloudBerry Backup can help you.

    For full details check our article on Microsoft SQL Server Database Backup. The gist of it, however, is that you simply run the wizard and select S3 as your backup storage, as in the screenshot below.

    Back up SQL Server to S3: Selecting storage in CloudBerry Backup

    In this way, CloudBerry Backup makes it easy to perform SQL Server database backups to AWS on a regular basis, and in a way that will allow you to recover the databases quickly if needed.

    Configure the rest of the options suggested by the wizard and finish creation of the backup plan for your SQL Server backup to S3.

    Image-Based SQL Server Backup to S3 with CloudBerry Backup

    CloudBerry Backup also allows you to implement a cloud disaster recovery solution by performing an image-based backup. With this option, you back up your database to an EC2 virtual machine instance in the AWS cloud. Then, if you need to recover the data, you can restore it almost instantly by starting the instance, with just a few clicks inside CloudBerry Backup.

    To use image-based backup for SQL Server databases, follow the steps described below (or check our article Image-Based Backup and Recovery with CloudBerry Backup for more details if necessary).

    1In CloudBerry Backup, create an image-level backup for the server with Microsoft SQL Server and point to AWS S3 as a target.
    Setting up image-based backup for MS SQL Server with CloudBerry Backup

    2In the next step, select the previously created S3 storage account as a target, click Next and then select Image Based Backup option.

    3The Select Partitions step allows you to determine whether CloudBerry Backup should create a backup of only selected partitions, only system ones, or a backup of all partitions present. Configure as desired.Selecting partitions to backup with CloudBerry Backup for MS SQL Server We suggest accepting the Backup All Drives option only in situations where SQL data is stored on the separate partition. This will protect you from mistakes in the future.

    4Configure the rest of the options suggested by the wizard and finish creation of the backup plan for your image-based backup of SQL Server to Amazon S3. For example, you may wish to take advantage of the block-level backup feature which lets you back up only modified image blocks, instead of backing up an entire database. This way, there is less data to transfer, so backups are completed faster.

    SQL Server Restore to EC2

    If you use CloudBerry Backup to create an image-based backup of your Microsoft SQL Server databases to S3, you can quickly and easily restore the data by running the Restore to EC2 wizard within CloudBerry Backup.

    Run the Restore to EC2 wizard within CloudBerry Backup

    Follow the wizard steps as described in the guide called How to do a Full Server Restore to Amazon EC2 Using CloudBerry Backup to complete the restoration.

    Conclusion

    As we’ve seen, there are several approaches available for backing up Microsoft SQL Server databases to the AWS cloud. The main differences between them is the amount of effort they require to perform backups and to restore data. If you are looking for a simple way of SQL Server backup to S3 - and the one that will allow you to restore data fastest during disaster recovery - check a 15-day free trial of CloudBerry Backup for MS SQL Server.

    CloudBerry Backup for MS SQL Server
    • Full, differential and transaction log backup
    • On-site and off-site backup options
    • Image-based and system state backup
    New call-to-action
    CloudBerry Backup icon