Backing Up SQL Databases to Azure using PowerShell

Azure can be used to store your data and your SQL backup. Thanks to Azure Storage, you can use the Cool Storage type (instead of Hot Storage type) to store data that are rarely accessed. To backup your SQL databases, you can use the SSMS or just use PowerShell to automate this task.

You must install the SQL Server module through the PowerShell Gallery:

PS > Install-Module -Name SqlServer

Wait until the module is installed:

Then import it with the following command:

PS > Import-Module SQLPS

Now, you can easily use PowerShell to backup a database:

Open the Azure Portal and confirm that the .bak file is created:

 

Thanks for reading! You can follow me on Twitter @PrigentNico

About Nicolas 282 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.