File Share Snapshot automation — Creation
Introduction
The aim of this doc is to explain the method to take automated on-demand snapshots for Azure File Share.
Snapshot for Azure File Share is now in Normal Availability. Beforehand, Azure File Share didn’t have any backup possibility. In case of the File Share getting deleted, there was no mechanism to get well the File Share and the info was misplaced. The File Share Snapshot helps organizations take on-demand snapshot backups of the prevailing File Share for restoring it later as and when required. This doc describes automating this course of.
Pre-requisites
- Subscription contributor
- Implementation Steps
Step 1. Seek for Automation Account within the Useful resource Blade and open the Automation Account Service.
Step 2. Click on on + Create to create a brand new Automation Account.
Step 3. Fill within the beneath particulars and click on on Subsequent.
Step 4. Choose the System Assigned checkbox which can assign a System-assigned Managed Identification to this Automation account. Click on on Subsequent.
Step 5. Choose Personal Entry which can allow us to create a Personal Endpoint to this NFS Storage.
Step 6. Present the Tags and click on Assessment + Create to validate and create the Automation Account.
Step 7. As soon as the useful resource has been created, go to the useful resource, click on on Runbooks à + Create a Runbook. This runbook is for creating new snapshots.
Step 8. Present the Runbook Identify, Kind, Model, and Description, and click on on Assessment + Create to create the Runbook.
Step 9. It will create the Runbook and open the playground to avoid wasting our code. Within the playground, save the beneath code.
Join-AzAccount -Identification
$StorageAccounts = Get-AzStorageAccount
Write-Output $StorageAccounts
foreach ($sa in $StorageAccounts) ? $_.EnabledProtocols -eq "NFS"
foreach ($nfsshare in $shares)
Write-Host "*** Discovered NFS Share: $($nfsshare.Identify)"
Write-Host "Creating Snapshot...`n"
New-AzRmStorageShare -StorageAccountName $sa.StorageAccountName -ResourceGroupName $sa.ResourceGroupName -Identify $nfsshare.Identify -Snapshot -ErrorAction Proceed
if ($shares -ne $null) ? $_.EnabledProtocols -eq "NFS" -and $_.SnapshotTime -ne $null
Step 10. Click on on Schedule click on on + Add a schedule.
Step 11. Click on on Schedule as proven within the snapshot beneath.
Step 12. Click on on + Add a Schedule.
Step 13. Present the schedule for the Automation account to execute the Runbook and click on on Create to create a schedule.
Know extra about our firm at Skrots. Know extra about our companies at Skrots Providers, Additionally checkout all different blogs at Weblog at Skrots
Know more about our company at Skrots. Know more about our services at Skrots Services, Also checkout all other blogs at Blog at Skrots
Thanks, Harsh
Founder | CEO — Skrots
Learn more about our blog at Blog at Skrots. Checkout our list of services on Skrots. Give a look at our website design at Skrots . Checkout our LinkedIn Page at LinkedIn.com. Check out our original post at https://blog.skrots.com/file-share-snapshot-automation-creation/?feed_id=5738&_unique_id=66170644852cb