Reputation: 657
I'm trying to create a powershell script to backup a SQL database on Azure to a storage account as below,
$exportRequest = New-AzureRmSqlDatabaseExport -ResourceGroupName
$ResourceGroupName -ServerName $ServerName `
-DatabaseName $DatabaseName -StorageKeytype $StorageKeytype -StorageKey
$StorageKey -StorageUri $BacpacUri `
-AdministratorLogin $creds.UserName -AdministratorLoginPassword $creds.Password
This is the document i'm following,
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-export
I assume the following,
$ResourceGroupName - my azure resource group
$ServerName - db server name
$DatabaseName - database name
**$StorageKeytype - NOT SURE WHAT VALUE SHOULD BE PLACED HERE**
**$StorageKey - I'm hoping this is one of the access keys under the azure storage account**
$BacpacUri - Azure storage account bacpac URI path
Please advice what parameters need to passed here.
Upvotes: 0
Views: 633
Reputation: 42063
Please advice what parameters need to passed here.
StorageKey : Specifies the access key for the storage account.
StorageKeyType: Specifies the type of access key for the storage account.
The acceptable values for this parameter are:
StorageAccessKey
. This value uses a storage account key.
SharedAccessKey
. This value uses a Shared Access Signature (SAS) key.
For more details, refer to this link.
Upvotes: 1