Could you please assist me to take Backup using Recovery Service vault of Azure file shares. If there is an ARM template to achieve the same , that will also work.
This links states that in future we'll have this however no update later on.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "canadacentral",
"metadata": {
"description": "The region where Azure will house the deployment."
},
"minLength": 5
}
},
"variables": {
"namespace": "jira",
"jira": {
"storage": {
"name": "[concat(variables('namespace'), 'storage', uniqueString(resourceGroup().id))]",
"sharedHomeName": "[concat(variables('namespace'), '-shared-home')]",
"diagnostics": "[concat(variables('namespace'), 'diag', uniqueString(resourceGroup().id))]",
"skuName": "Premium_LRS",
"skuTier": "Premium"
}
},
"vaultName": "[concat(variables('namespace'), '-vault-', uniqueString(resourceGroup().id))]",
"policyName": "SharedHomeBackupPolicy",
"schedule": {
"scheduleRunFrequency": "Daily",
"scheduleRunDays": null,
"scheduleRunTimes": [
"2020-01-01T10:00:00.000Z"
],
"schedulePolicyType": "SimpleSchedulePolicy"
},
"retention": {
"dailySchedule": {
"retentionTimes": [
"2020-01-01T10:00:00.000Z"
],
"retentionDuration": {
"count": 30,
"durationType": "Days"
}
},
"weeklySchedule": null,
"monthlySchedule": null,
"yearlySchedule": null,
"retentionPolicyType": "LongTermRetentionPolicy"
},
"timeZone": "UTC",
"fabricName": "Azure",
"protectionContainers": "[array(concat('storagecontainer;storage;', resourceGroup().name, ';', variables('jira').storage.name))]",
"sharedHomeSizeInGb": "128",
"protectedItems": "[array(concat('azurefileshare;', variables('jira').storage.sharedHomeName))]",
"skuName": "RS0",
"skuTier": "Standard"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"comments": "Only have this resource in this template because not allowed to return keys/secrets in output pararms.",
"apiVersion": "2019-06-01",
"name": "[variables('jira').storage.name]",
"location": "[parameters('location')]",
"sku": {
"name": "[variables('jira').storage.skuName]",
"tier": "[variables('jira').storage.skuTier]"
},
"kind": "FileStorage",
"properties": {
"largeFileSharesState": "Enabled",
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": true,
"encryption": {
"services": {
"file": {
"keyType": "Account",
"enabled": true
},
"blob": {
"keyType": "Account",
"enabled": true
}
},
"keySource": "Microsoft.Storage"
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/fileServices",
"apiVersion": "2019-06-01",
"name": "[concat(variables('jira').storage.name, '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('jira').storage.name)]"
],
"sku": {
"name": "[variables('jira').storage.skuName]"
}
},
{
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2019-06-01",
"name": "[concat(variables('jira').storage.name, '/default/', variables('jira').storage.sharedHomeName)]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/fileServices', variables('jira').storage.name, 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('jira').storage.name)]"
],
"properties": {
"shareQuota": "[variables('sharedHomeSizeInGb')]"
}
},
{
"type": "Microsoft.RecoveryServices/vaults",
"apiVersion": "2018-01-10",
"name": "[variables('vaultName')]",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/fileServices/shares', variables('jira').storage.name, 'default', variables('jira').storage.sharedHomeName)]"
],
"sku": {
"name": "[variables('skuName')]",
"tier": "[variables('skuTier')]"
},
"properties": {}
},
{
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"apiVersion": "2019-05-13",
"name": "[concat(variables('vaultName'), '/', variables('policyName'))]",
"dependsOn":[
"[resourceId('Microsoft.RecoveryServices/vaults', variables('vaultName'))]"
],
"properties": {
"backupManagementType": "AzureStorage",
"WorkloadType": "AzureFileShare",
"schedulePolicy": "[variables('schedule')]",
"retentionPolicy": "[variables('retention')]",
"TimeZone": "[variables('timeZone')]"
}
},
{
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems",
"apiVersion": "2019-05-13",
"name": "[concat(variables('vaultName'), '/', variables('fabricName'), '/',variables('protectionContainers')[copyIndex()], '/', variables('protectedItems')[copyIndex()])]",
"dependsOn": [
"[concat('Microsoft.RecoveryServices/vaults', '/', variables('vaultName'), '/backupPolicies/', variables('policyName'))]"
],
"properties": {
"backupManagementType": "AzureStorage",
"workloadType": "AzureFileShare",
"protectedItemType": "AzureFileShareProtectedItem",
"policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', variables('vaultName'), variables('policyName'))]",
"sourceResourceId": "[resourceId('Microsoft.Storage/storageAccounts',variables('jira').storage.name)]"
},
"copy": {
"name": "protectedItemsCopy",
"count": "[length(variables('protectedItems'))]"
}
}
],
"outputs": {
}
}