【问题标题】:Azure recovery vault backup policy through arm wont change timezone通过 arm 的 Azure 恢复库备份策略不会更改时区
【发布时间】:2021-07-24 01:15:35
【问题描述】:

我正在尝试自动化 Azure 恢复保险库的一些部署和一些策略。

但是我似乎无法通过 ARM 更改策略的时区。

我目前尝试将时区值硬编码为“浪漫标准时间”,但它似乎不接受它

"name": "defaultbackupPolicies",
        "count": "[length(parameters('recoveryPolicies'))]",
        "input": {
          "backupManagementType": "AzureIaasVM",
          "instantRpRetentionRangeInDays": "5",
          "timeZone": "Romance Standard Time",

但它仍然默认为 UTC

【问题讨论】:

  • 部署模板时是否发现任何错误?指定不同的 TZ 是否有效?还可以尝试在问题中包含更大的模板 sn-p。
  • 这个问题有更新吗?
  • 不,我在部署@BhargaviAnnadevara 时没有发现任何问题。策略的另一部分只是保留期限配置,带有大量参数逻辑
  • @JoyWang 没有,我在这个问题上没有任何进展,除了让一些同事确认问题

标签: azure azure-resource-manager recovery


【解决方案1】:

我认为您需要在资源Microsoft.RecoveryServices/vaults/backupPoliciesproperties 中指定"timeZone": "Romance Standard Time"

试用该示例对我有用,testpolicy 是使用Romance Standard Time 配置的策略。

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "vault_name": {
            "type": "String"
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.RecoveryServices/vaults",
            "apiVersion": "2021-01-01",
            "name": "[parameters('vault_name')]",
            "location": "westus2",
            "tags": {
            },
            "sku": {
                "name": "RS0",
                "tier": "Standard"
            },
            "properties": {}
        },
        {
            "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
            "apiVersion": "2021-01-01",
            "name": "[concat(parameters('vault_name'), '/testpolicy')]",
            "dependsOn": [
                "[resourceId('Microsoft.RecoveryServices/vaults', parameters('vault_name'))]"
            ],
            "properties": {
                "backupManagementType": "AzureIaasVM",
                "instantRPDetails": {},
                "schedulePolicy": {
                    "schedulePolicyType": "SimpleSchedulePolicy",
                    "scheduleRunFrequency": "Daily",
                    "scheduleRunTimes": [
                        "2021-05-04T04:30:00Z"
                    ],
                    "scheduleWeeklyFrequency": 0
                },
                "retentionPolicy": {
                    "retentionPolicyType": "LongTermRetentionPolicy",
                    "dailySchedule": {
                        "retentionTimes": [
                            "2021-05-04T04:30:00Z"
                        ],
                        "retentionDuration": {
                            "count": 180,
                            "durationType": "Days"
                        }
                    }
                },
                "instantRpRetentionRangeInDays": 2,
                "timeZone": "Romance Standard Time",
                "protectedItemsCount": 0
            }
        }

    ]
}

在门户中查看结果:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-09-11
    • 2014-10-04
    • 2010-09-06
    • 2016-05-20
    • 2019-09-28
    • 2010-09-07
    • 1970-01-01
    相关资源
    最近更新 更多