01 Sign in to your Cloud Conformity account, access Sufficient Instant Restore Retention Period conformity rule settings and copy the retention period configured for the specified rule.
02 Run backup policy show command (Windows/macOS/Linux) using the name of the backup policy that you want to update as identifier parameter (see Audit section part II to identify the right backup policy), to list the configuration properties available for the selected policy:
az backup policy show
--resource-group cloud-shell-storage-westeurope
--vault-name cc-main-backup-vault
--name ProductionPolicy
03 The command output should return the requested configuration properties. This information is required later when the selected policy is updated with the correct retention period:
{
"eTag": null,
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourcegroups/cloud-shell-storage-westeurope/providers/microsoft.recoveryservices/vaults/cc—main-backup-vault/backupPolicies/ProductionPolicy",
"location": null,
"name": "ProductionPolicy",
"properties": {
"backupManagementType": "AzureIaasVM",
"instantRPDetails": {},
"instantRpRetentionRangeInDays": 2,
"protectedItemsCount": 1,
"retentionPolicy": {
"dailySchedule": {
"retentionDuration": {
"count": 30,
"durationType": "Days"
},
"retentionTimes": [
"2019-10-31T00:00:00+00:00"
]
},
"monthlySchedule": null,
"retentionPolicyType": "LongTermRetentionPolicy",
"weeklySchedule": null,
"yearlySchedule": null
},
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunDays": null,
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2019-10-31T00:00:00+00:00"
],
"scheduleWeeklyFrequency": 0
},
"timeZone": "UTC"
},
"resourceGroup": "cloud-shell-storage-westeurope",
"tags": null,
"type": "Microsoft.RecoveryServices/vaults/backupPolicies"
}
04 Update the backup policy returned at the previous step by replacing the instant restore retention period for virtual machine snapshots, available as value for the "properties.instantRpRetentionRangeInDays" configuration attribute (highlighted), with the value copied at step no. 1. Once the selected policy is updated, save the JSON document to a file named instant-recovery-backup-policy.json:
{
"eTag": null,
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourcegroups/cloud-shell-storage-westeurope/providers/microsoft.recoveryservices/vaults/cc—main-backup-vault/backupPolicies/ProductionPolicy",
"location": null,
"name": "ProductionPolicy",
"properties": {
"backupManagementType": "AzureIaasVM",
"instantRPDetails": {},
"instantRpRetentionRangeInDays": 5
,
"protectedItemsCount": 1,
"retentionPolicy": {
"dailySchedule": {
"retentionDuration": {
"count": 30,
"durationType": "Days"
},
"retentionTimes": [
"2019-10-31T00:00:00+00:00"
]
},
"monthlySchedule": null,
"retentionPolicyType": "LongTermRetentionPolicy",
"weeklySchedule": null,
"yearlySchedule": null
},
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunDays": null,
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2019-10-31T00:00:00+00:00"
],
"scheduleWeeklyFrequency": 0
},
"timeZone": "UTC"
},
"resourceGroup": "cloud-shell-storage-westeurope",
"tags": null,
"type": "Microsoft.RecoveryServices/vaults/backupPolicies"
}
05 Run backup policy set command (Windows/macOS/Linux) using the name of backup policy document defined at the previous step as value for the --policy parameter (i.e. instant-recovery-backup-policy.json) to update the selected backup policy in order to set the optimal instant restore retention period for the associated Azure virtual machine (VM):
az backup policy set
--ids "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourcegroups/cloud-shell-storage-westeurope/providers/microsoft.recoveryservices/vaults/cc—main-backup-vault/backupPolicies/ProductionPolicy"
--policy instant-recovery-backup-policy.json
06 The command output should return the configuration metadata for the modified policy:
{
"eTag": null,
"id": "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourcegroups/cloud-shell-storage-westeurope/providers/microsoft.recoveryservices/vaults/cc—main-backup-vault/backupPolicies/ProductionPolicy",
"location": null,
"name": "ProductionPolicy",
"properties": {
"backupManagementType": "AzureIaasVM",
"instantRPDetails": {},
"instantRpRetentionRangeInDays": 5,
"protectedItemsCount": 1,
"retentionPolicy": {
"dailySchedule": {
"retentionDuration": {
"count": 30,
"durationType": "Days"
},
"retentionTimes": [
"2019-10-31T00:00:00+00:00"
]
},
"monthlySchedule": null,
"retentionPolicyType": "LongTermRetentionPolicy",
"weeklySchedule": null,
"yearlySchedule": null
},
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunDays": null,
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2019-10-31T00:00:00+00:00"
],
"scheduleWeeklyFrequency": 0
},
"timeZone": "UTC"
},
"resourceGroup": "cloud-shell-storage-westeurope",
"tags": null,
"type": "Microsoft.RecoveryServices/vaults/backupPolicies"
}
07 Repeat steps no. 2 – 6 for each Azure virtual machine (VM) that you need to update, available in the current subscription.
08 If required, repeat steps no. 2 – 7 for each subscription created in your Microsoft Azure cloud account.