Backup Azure File Shares
If you have created a file-share in Azure, it is nice to have a backup. Luckily Microsoft delivers a backup-solution in the Azure environment. In this blog I will tell you how to establish a scheduled backup with specific retention times.
Azure file shares are fully managed file shares in the cloud that are accessible via the standard SMB (v3) protocol. You can mount these file-shares concurrently in the cloud or on-premises on Windows, Linux and MacOS.
Backups for Azure files are created in the Recovery Services Vault. So we first need to create a “Recovery Services Vault”
- Sign in to your Azure Portal
- Search for Recovery
- Select Recovery Services Vaults
- On the Dashboard select Add
- Select a Resource Group
- Give the Vault a name and click on Review + Create
- Click Create
The Vault is created.
Go to your newly created Vault and first go to properties as the storage replication type is set to “Geo Redundant” at start and this setting cannot be changed once we are protecting data. Geo redundant can be interesting if you need your data at multiple locations, but its also more expensive then Locally Redundant storage, so we need to change that. Go to Backup Configuration and click Update.
Select “Locally Redundant” and click Save.
Now you go to Backup in the sidebar on the left and select the workload location and what you want to backup:
- Click on Backup
- Select Storage Account and select a Storage Account, select Validate
- Add the file-share to backup, if there are no file-shares listed, then there is no file share to be backed up in that Storage Account.
Now you can start creating a Backup Policy for this fileshare. Click on “Create a new policy” give this new policy a name and set a time for it to start.
Make sure you edit the Timezone. In the next screenshot you can see I have a backup setup for every day, and a retention for 30 days on the daily backup, 4 weeks on the weekly backup and 1 year on the Monthly backups
When you are finished, click OK and click Enable Backup, Azure will deploy your backup now.
On the left click on Backup Items and select Azure Storage (Azure Files)
As you will see the Backup gives an error click the 3 dots … and click backup now. You will be asked untill when you want to retain the backup and click OK. The backup will now start.
You now have a scheduled backup of your Azure File Share(s).