powershell - 使用 powershell 将 bacpac 导出到 Azure 存储帐户
问题描述
我正在尝试创建一个 powershell 脚本来将 Azure 上的 SQL 数据库备份到存储帐户,如下所示,
$exportRequest = New-AzureRmSqlDatabaseExport -ResourceGroupName
$ResourceGroupName -ServerName $ServerName `
-DatabaseName $DatabaseName -StorageKeytype $StorageKeytype -StorageKey
$StorageKey -StorageUri $BacpacUri `
-AdministratorLogin $creds.UserName -AdministratorLoginPassword $creds.Password
这是我正在关注的文件,
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-export
我假设以下,
$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
请告知此处需要传递哪些参数。
解决方案
请告知此处需要传递哪些参数。
StorageKey:指定存储帐户的访问密钥。
StorageKeyType:指定存储帐户的访问密钥类型。
此参数的可接受值为:
StorageAccessKey
. 此值使用存储帐户密钥。SharedAccessKey
. 此值使用共享访问签名 (SAS) 密钥。
有关更多详细信息,请参阅此链接。
推荐阅读
- javascript - html中的正则表达式创建相同的模式
- django - ProgrammingError 列 Users_student.school 在 django 中不存在
- javascript - 如何循环嵌套对象和数组Javascript?
- python - 熊猫函数 read_html 的问题
- azure - Azure - 为 Azure Cosmos DB 配置灾难恢复和自动故障转移?
- hashicorp-vault - Hashicorp Vault 中的 SSL 证书配置
- javascript - 具有间隔的角度更新 matTableDatasource 将滚动到页面顶部
- python - 用最大日期替换具有相同 ID 的行的值
- python - 如何将多个特征组合到 KMeans 中
- c++ - 中止(核心转储)从 C++ 中的向量中删除元素