Back up Azure file shares

This article explains how to back up Azure file shares from the Azure portal.

In this article, you'll learn how to:

  • Create a Recovery Services vault.
  • Configure backup from the Recovery Services vault
  • Configure backup from the file share pane
  • Run an on-demand backup job to create a restore point

Prerequisites

  • Learn about the Azure file share snapshot-based backup solution.
  • Ensure that the file share is present in one of the supported storage account types.
  • Identify or create a Recovery Services vault in the same region and subscription as the storage account that hosts the file share.
  • In case you have restricted access to your storage account, check the firewall settings of the account to ensure that the exception "Allow Azure services on the trusted services list to access this storage account" is granted. You can refer to this link for the steps to grant an exception.

Create a Recovery Services vault

A Recovery Services vault is a management entity that stores recovery points that are created over time, and it provides an interface to perform backup-related operations. These operations include taking on-demand backups, performing restores, and creating backup policies.

To create a Recovery Services vault:

  1. Sign in to the Azure portal.

  2. Search for Backup center, and then go to the Backup center dashboard.

    Screenshot that shows where to search for and select 'Backup center'.

  3. On the Overview pane, select Vault.

    Screenshot of the button for creating a Recovery Services vault.

  4. Select Recovery Services vault > Continue.

    Screenshot that shows where to select Recovery Services as the vault type.

  5. On the Recovery Services vault pane, enter the following values:

    • Subscription: Select the subscription to use. If you're a member of only one subscription, you'll see that name. If you're not sure which subscription to use, use the default subscription. There are multiple choices only if your work or school account is associated with more than one Azure subscription.

    • Resource group: Use an existing resource group or create a new one. To view a list of available resource groups in your subscription, select Use existing, and then select a resource in the dropdown list. To create a new resource group, select Create new, and then enter the name. For more information about resource groups, see Azure Resource Manager overview.

    • Vault name: Enter a friendly name to identify the vault. The name must be unique to the Azure subscription. Specify a name that has at least 2 but not more than 50 characters. The name must start with a letter and consist only of letters, numbers, and hyphens.

    • Region: Select the geographic region for the vault. For you to create a vault to help protect any data source, the vault must be in the same region as the data source.

      Important

      If you're not sure of the location of your data source, close the window. Go to the list of your resources in the portal. If you have data sources in multiple regions, create a Recovery Services vault for each region. Create the vault in the first location before you create a vault in another location. There's no need to specify storage accounts to store the backup data. The Recovery Services vault and Azure Backup handle that automatically.

    Screenshot that shows fields for configuring a Recovery Services vault.

  6. After you provide the values, select Review + create.

    Screenshot that shows the 'Review + create' button for creating a Recovery Services vault.

  7. When you're ready to finish creating the Recovery Services vault, select Create.

    Screenshot that shows the final 'Create' button for creating the Recovery Services vault.

    It can take a while to create the Recovery Services vault. Monitor the status notifications in the Notifications area at the upper right. After your vault is created, it's visible in the list of Recovery Services vaults. If your vault isn't displayed, select Refresh.

    Screenshot that shows the button for refreshing the list of backup vaults.

Configure backup from the Recovery Services vault

To configure backup for multiple file shares from the Recovery Services vault pane, follow these steps:

  1. In the Azure portal, go to Backup center and click +Backup.

    Screenshot showing to configure Backup for Azure File.

  2. Select Azure Files (Azure Storage) as the datasource type, select the vault that you wish to protect the file shares with, and then click Continue.

    Screenshot showing to select Azure Files.

  3. Click Select to select the storage account that contains the file shares to be backed-up.

    The Select Storage Account Pane opens on the right, listing a set of discovered supported storage accounts. They're either associated with this vault or present in the same region as the vault, but not yet associated to any Recovery Services vault.

    Screenshot showing to select a storage account.

  4. From the list of discovered storage accounts, select an account, and select OK.

    Screenshot showing to select one of the discovered storage accounts.

    Note

    If a storage account is present in a different region than the vault, it won't be present in the list of discovered storage accounts.

  5. The next step is to select the file shares you want to back up. Select the Add button in the FileShares to Backup section.

    Screenshot showing to select the file shares to back up.

  6. The Select File Shares context pane opens on the right. Azure searches the storage account for file shares that can be backed up. If you recently added your file shares and don't see them in the list, allow some time for the file shares to appear.

  7. From the Select File Shares list, select one or more of the file shares you want to back up. Select OK.

  8. To choose a backup policy for your file share, you have three options:

    • Choose the default policy.
      This option allows you to enable daily backup that will be retained for 30 days. If you don’t have an existing backup policy in the vault, the backup pane opens with the default policy settings. If you want to choose the default settings, you can directly select Enable backup.

    • Create a new policy

      1. To create a new backup policy for your file share, select the link text below the drop-down list in the Backup Policy section.

        Screenshot showing to create new policy.

      2. Follow the steps 3-7 in the Create a new policy section.

      3. After defining all attributes of the policy, click OK.

        Screenshot showing to provide policy name and retention values.

    • Choose one of the existing backup policies

      To choose one of the existing backup policies for configuring protection, select the desired policy from the Backup policy drop-down list.

      Choose existing policy

  9. Select Enable Backup to start protecting the file share.

    Choose enable backup

After you set a backup policy, a snapshot of the file shares is taken at the scheduled time. The recovery point is also retained for the chosen period.

Configure backup from the file share pane

The following steps explain how you can configure backup for individual file shares from the respective file share pane:

  1. In the Azure portal, open the storage account hosting the file share you want to back up.

  2. Once in the storage account, select the tile labeled File shares. You can also navigate to File shares via the table of contents for the storage account.

    Storage account

  3. In the file share listing, you should see all the file shares present in the storage account. Select the file share you want to back up.

    File shares list

  4. Select Backup under the Operations section of the file share pane. The Configure backup pane will load on the right.

    Configure backup pane

  5. For the Recovery Services vault selection, do one of the following:

    • If you already have a vault, select the Select existing Recovery Services vault radio button, and choose one of the existing vaults from Vault Name drop down menu.

      Select existing vault

    • If you don't have a vault, select the Create new Recovery Services vault radio button. Specify a name for the vault. It's created in the same region as the file share. By default, the vault is created in the same resource group as the file share. If you want to choose a different resource group, select Create New link below the Resource Type drop down and specify a name for the resource group. Select OK to continue.

      Create new vault

      Important

      If the storage account is registered with a vault, or there are few protected shares within the storage account hosting the file share you're trying to protect, the Recovery Services vault name will be pre-populated and you won’t be allowed to edit it Learn more here.

  6. For the Backup Policy selection, do one of the following:

    • Leave the default policy. It will schedule daily backups with a retention of 30 days.

    • Select an existing backup policy, if you have one, from the Backup Policy drop-down menu.

      Choose backup policy

    • Create a new policy with daily/weekly/monthly/yearly retention according to your requirement.

      1. Select the Create a new policy link text.

      2. Follow the steps 3-7 in the Create a new policy section.

      3. After defining all attributes of the policy, click OK.

        Create new backup policy

  7. Select Enable backup to start protecting the file share.

    Select Enable backup

  8. You can track the configuration progress in the portal notifications, or by monitoring the backup jobs under the vault you're using to protect the file share.

    Portal notifications

  9. After the completion of the configure backup operation, select Backup under the Operations section of the file share pane. The context pane listing Vault Essentials will load on the right. From there, you can trigger on-demand backup and restore operations.

    Vault essentials

Run an on-demand backup job

Occasionally, you might want to generate a backup snapshot, or recovery point, outside of the times scheduled in the backup policy. A common reason to generate an on-demand backup is right after you've configured the backup policy. Based on the schedule in the backup policy, it might be hours or days until a snapshot is taken. To protect your data until the backup policy engages, initiate an on-demand backup. Creating an on-demand backup is often required before you make planned changes to your file shares.

From Backup center

  1. Go to Backup center and click Backup Instances from the menu.

    Filter for Azure Files (Azure Storage) as the datasource type.

    Screenshot showing to select Backup instances.

  2. Select the item for which you want to run an on-demand backup job.

  3. In the Backup Item menu, select Backup now. Because this backup job is on demand, there's no retention policy associated with the recovery point.

    Screenshot showing to select Backup now.

  4. The Backup Now pane opens. Specify the last day you want to retain the recovery point. You can have a maximum retention of 10 years for an on-demand backup.

    Screenshot showing to choose retention date.

  5. Select OK to confirm the on-demand backup job that runs.

  6. Monitor the portal notifications to keep a track of backup job run completion.

    To monitor the job progress in the Backup center dashboard, select Backup center -> Backup Jobs -> In progress.

From the file share pane

  1. Open the file share’s Overview pane for which you want to take an on-demand backup.

  2. Select Backup under the Operation section. The context pane listing Vault Essentials will load on the right. Select Backup Now to take an on-demand backup.

    Select Backup Now

  3. The Backup Now pane opens. Specify the retention for the recovery point. You can have a maximum retention of 10 years for an on-demand backup.

    Retain backup date

  4. Select OK to confirm.

Note

Azure Backup locks the storage account when you configure protection for any file share in the corresponding account. This provides protection against accidental deletion of a storage account with backed up file shares.

Best practices

  • Don't delete snapshots created by Azure Backup. Deleting snapshots can result in loss of recovery points and/or restore failures.

  • Don't remove the lock taken on the storage account by Azure Backup. If you delete the lock, your storage account will be prone to accidental deletion and if it's deleted, you'll lose your snapshots or backups.

Next steps

Learn how to: