簡體   English   中英

Azure 使用 Azure devops 的存儲帳戶故障轉移

[英]Azure Storage account failover using Azure devops

是否有任何解決方法可以使用 CICD 管道進行存儲故障轉移? 下面的鏈接討論安裝預覽版。 我試圖將 1.1.1-preview 放在 Azure powershell 任務的首選版本中,但不起作用

https://docs.microsoft.com/en-us/azure/storage/common/storage-initiate-account-failover?tabs=azure-powershell

解決方案:

我在此鏈接上添加了所有 powershell 命令,它通過CICD https://docs.microsoft.com/en-us/azure/storage/common/storage-initiate-account-failover?tabs=azure-powershell工作

我試圖將 1.1.1-preview 放在 Azure powershell 任務的首選版本中,但不起作用

1.1.1-preview 是Az.Storage模塊的一個版本,而不是Azure Powershell版本。

So if you set 1.1.1-preview as Preferred Azure PowerShell Version , the Azure Powershell task can't recognize this version and the error will be thrown:

[error]The Azure PowerShell version '1.1.1.preview' specified is not in the correct format.

所以我建議使用Azure CLI 任務(內聯腳本模式),內容如下:

az storage account show \ --name accountName \ --expand geoReplicationStats
az storage account failover \ --name accountName

您可以在此處參考相關文檔。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM