Archive
Simple Guide to restore SQL Server Backup from Azure Blog Storage using Management Studio
In previous post, we saw
1. How to implement Off-site/Cloud backup in SQL Server 2017 using Azure Blob Storage
2. How to restore SQL Server Backup from Azure Blog Storage using queries
In this post we will see how to restore SQL Server Backup from Azure Blog Storage using SQL Server Management Studio
Step 1: Open SQL Server Management Studio 2017 and connect to SQL Server on which you would like restore the database and right click on “Databases” node and click on “Restore Database…”
Step 2: Select Backup media type as “URL” and click on “Add”
Step 3: Click “Add” to add the new Azure Storage container
If you are not already signed in, sign in to Azure account and then select the Subscription, Storage account and blob container
Based on you requirement, set up the Expiration date for Shared Access policy, by default, its setup for 1 year from date of setup
Click on “Create Credential” to generate the Shared Access Signature (SAS), once SAS is generated successfully, click “Ok” to continue
Step 4: Please review the selected Azure Storage Container and Shared Access Signature and click “Ok” to continue
Please select the backup file, you wish to restore
Please review the selected backup media and click “Ok” to continue
Step 5: Based on requirement change other options in Files tab or Options tab and click “Ok” to start the restore process
Once restore is completed, we should see this restored successfully message
We should also be able to see the database restored in Object Explorer as well
Hope you find this post helpful !!!
Simple guide to restore SQL Server Backup from Azure Blog Storage
In previous post, we saw How to implement Off-site/Cloud backup in SQL Server 2017 using Azure Blob Storage, in this post we will see how to restore SQL Server Backup from Azure Blog Storage
Step 1: Create Credential – Please use below query to create Credential to access Azure Blog Storage using Shared Access Signature, This step is optional if you already have created Credential to create backup
CREATE CREDENTIAL [https://XYZ.blob.core.windows.net/YourContainerName] WITH IDENTITY = 'SHARED ACCESS SIGNATURE', SECRET = 'sv=Replace your SAS Key Here'; GO
Step 2: Restore Database from Cloud (Azure Blog Storage) – Please run below query to restore the database using SQL Server Backup stored in Azure Blog Storage, Please change the query to meet your needs
USE [master] RESTORE DATABASE [SQL2017_DEMO] FROM URL = N'https://XYZ.blob.core.windows.net/YourContainerName/BackupFile.bak' WITH FILE = 1, MOVE N'SQL2017_DEMO' TO N'E:\SQLDATA\SQL2017_DEMO.mdf', MOVE N'SQL2017_DEMO_log' TO N'E:\SQLDATA\SQL2017_DEMO_log.ldf', NOUNLOAD, STATS = 5 GO
Output:
We can also see the database restored in Object Explorer
Hope you find this post helpful !!!