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.
4c8rllxm1#
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.
1条答案
按热度按时间4c8rllxm1#
Below PowerShell script will export an Azure SQL Database as bacpac and will storage on Azure BLOB account.
If you want to schedule execution of above export you can create a RunBook using Azure Automation.