Reputation: 517
How can we take the backup and upload the database hosted in Azure through SQL (preferably, execute a procedure and get it done) to azure blob storage.
Upvotes: 1
Views: 177
Reputation: 15608
Below PowerShell script will export an Azure SQL Database as bacpac and will storage on Azure BLOB account.
$exportRequest = New-AzureRmSqlDatabaseExport -ResourceGroupName $ResourceGroupName -ServerName $ServerName `
-DatabaseName $DatabaseName -StorageKeytype $StorageKeytype -StorageKey $StorageKey -StorageUri $BacpacUri `
-AdministratorLogin $creds.UserName -AdministratorLoginPassword $creds.Password
If you want to schedule execution of above export you can create a RunBook using Azure Automation.
Upvotes: 1