-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backup Azure Files to Recovery Services Vault (#142)
* Create Backup Policy for AzFiles * Rename protected item module * Protect file shares with Backup * Clarify output name of VM enhanced backup policy
- Loading branch information
1 parent
dd4b9d4
commit 092cf32
Showing
5 changed files
with
159 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
param backupPolicyName string | ||
param recoveryServicesVaultId string | ||
param storageAccountId string | ||
param fileShareName string | ||
|
||
var rsvName = split(recoveryServicesVaultId, '/')[8] | ||
|
||
var storageAccountRgName = split(storageAccountId, '/')[4] | ||
var storageAccountName = split(storageAccountId, '/')[8] | ||
|
||
resource protectionContainer 'Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers@2024-04-01' = { | ||
name: '${rsvName}/Azure/storagecontainer;Storage;${storageAccountRgName};${storageAccountName}' | ||
properties: { | ||
backupManagementType: 'AzureStorage' | ||
containerType: 'StorageContainer' | ||
sourceResourceId: storageAccountId | ||
} | ||
} | ||
|
||
resource protectedItem 'Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems@2024-04-01' = { | ||
parent: protectionContainer | ||
name: 'AzureFileShare;${fileShareName}' | ||
properties: { | ||
protectedItemType: 'AzureFileShareProtectedItem' | ||
sourceResourceId: storageAccountId | ||
policyId: resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', rsvName, backupPolicyName) | ||
//isInlineInquiry: true | ||
} | ||
} |
File renamed without changes.