Change how a storage account is replicated

Azure Storage always stores multiple copies of your data so that it is protected from planned and unplanned events, including transient hardware failures, network or power outages, and massive natural disasters. Redundancy ensures that your storage account meets the Service-Level Agreement (SLA) for Azure Storage even in the face of failures.

Azure Storage offers the following types of replication:

  • Locally redundant storage (LRS)
  • Zone-redundant storage (ZRS)
  • Geo-redundant storage (GRS) or read-access geo-redundant storage (RA-GRS)
  • Geo-zone-redundant storage (GZRS) or read-access geo-zone-redundant storage (RA-GZRS)

For an overview of each of these options, see Azure Storage redundancy.

Switch between types of replication

You can switch a storage account from one type of replication to any other type, but some scenarios are more straightforward than others. If you want to add or remove geo-replication or read access to the secondary region, you can use the Azure portal, PowerShell, or Azure CLI to update the replication setting in some scenarios; other scenarios require a manual or live migration. If you want to change how data is replicated in the primary region, by moving from LRS to ZRS or vice versa, then you must either perform a manual migration or request a live migration. And if you want to move from ZRS to GZRS or RA-GZRS, then you must perform a live migration, unless you are performing a failback operation after failover.

The following table provides an overview of how to switch from each type of replication to another:

Switching …to LRS …to GRS/RA-GRS …to ZRS …to GZRS/RA-GZRS
…from LRS N/A Use Azure portal, PowerShell, or CLI to change the replication setting1,2 Perform a manual migration

OR

Request a live migration5
Perform a manual migration

OR

Switch to GRS/RA-GRS first and then request a live migration3
…from GRS/RA-GRS Use Azure portal, PowerShell, or CLI to change the replication setting N/A Perform a manual migration

OR

Switch to LRS first and then request a live migration3
Perform a manual migration

OR

Request a live migration3
…from ZRS Perform a manual migration Perform a manual migration N/A Request a live migration3

OR

Use Azure Portal, PowerShell or Azure CLI to change the replication setting as part of a failback operation only4
…from GZRS/RA-GZRS Perform a manual migration Perform a manual migration Use Azure portal, PowerShell, or CLI to change the replication setting N/A

1 Incurs a one-time egress charge.
2 Migrating from LRS to GRS is not supported if the storage account contains blobs in the archive tier.
3 Live migration is supported for standard general-purpose v2 and premium file share storage accounts. Live migration is not supported for premium block blob or page blob storage accounts.
4 After an account failover to the secondary region, it's possible to initiate a fail back from the new primary back to the new secondary with PowerShell or Azure CLI (version 2.30.0 or later).
5 Migrating from LRS to ZRS is not supported if the NFSv3 protocol support is enabled for Azure Blob Storage or if the storage account contains Azure Files NFSv4.1 shares.

Caution

If you performed an account failover for your (RA-)GRS or (RA-)GZRS account, the account is locally redundant (LRS) in the new primary region after the failover. Live migration to ZRS or GZRS for an LRS account resulting from a failover is not supported. This is true even in the case of so-called failback operations. For example, if you perform an account failover from RA-GZRS to the LRS in the secondary region, and then configure it again to RA-GRS and perform another account failover to the original primary region, you can't contact support for the original live migration to RA-GZRS in the primary region. Instead, you'll need to perform a manual migration to ZRS or GZRS.

To change the redundancy configuration for a storage account that contains blobs in the Archive tier, you must first rehydrate all archived blobs to the Hot or Cool tier. Azure recommends that you avoid changing the redundancy configuration for a storage account that contains archived blobs if at all possible, because rehydration operations can be costly and time-consuming.

Change the replication setting

You can use the Azure portal, PowerShell, or Azure CLI to change the replication setting for a storage account, as long as you are not changing how data is replicated in the primary region. If you are migrating from LRS in the primary region to ZRS in the primary region or vice versa, then you must perform either a manual migration or a live migration.

Changing how your storage account is replicated does not result in down time for your applications.

To change the redundancy option for your storage account in the Azure portal, follow these steps:

  1. Navigate to your storage account in the Azure portal.

  2. Under Settings select Configuration.

  3. Update the Replication setting.

    Screenshot showing how to change replication option in portal.

Perform a manual migration to ZRS, GZRS, or RA-GZRS

If you want to change how data in your storage account is replicated in the primary region, by moving from LRS to ZRS or vice versa, then you may opt to perform a manual migration. A manual migration provides more flexibility than a live migration. You control the timing of a manual migration, so use this option if you need the migration to complete by a certain date.

When you perform a manual migration from LRS to ZRS in the primary region or vice versa, the destination storage account can be geo-redundant and can also be configured for read access to the secondary region. For example, you can migrate an LRS account to a GZRS or RA-GZRS account in one step.

You cannot use a manual migration to migrate from ZRS to GZRS or RA-GZRS. You must request a live migration.

A manual migration can result in application downtime. If your application requires high availability, Microsoft also provides a live migration option. A live migration is an in-place migration with no downtime.

With a manual migration, you copy the data from your existing storage account to a new storage account that uses ZRS in the primary region. To perform a manual migration, you can use one of the following options:

  • Copy data by using an existing tool such as AzCopy, one of the Azure Storage client libraries, or a reliable third-party tool.
  • If you're familiar with Hadoop or HDInsight, you can attach both the source storage account and destination storage account account to your cluster. Then, parallelize the data copy process with a tool like DistCp.

Request a live migration to ZRS, GZRS, or RA-GZRS

If you need to migrate your storage account from LRS to ZRS in the primary region with no application downtime, you can request a live migration from Azure. To migrate from LRS to GZRS or RA-GZRS, first switch to GRS or RA-GRS and then request a live migration. Similarly, you can request a live migration from ZRS, GRS, or RA-GRS to GZRS or RA-GZRS. To migrate from GRS or RA-GRS to ZRS, first switch to LRS, then request a live migration.

During a live migration, you can access data in your storage account with no loss of durability or availability. The Azure Storage SLA is maintained during the migration process. There is no data loss associated with a live migration. Service endpoints, access keys, shared access signatures, and other account options remain unchanged after the migration.

For standard performance, ZRS supports general-purpose v2 accounts only, so make sure to upgrade your storage account if it is a general-purpose v1 account prior to submitting a request for a live migration to ZRS. For more information, see Upgrade to a general-purpose v2 storage account. A storage account must contain data to be migrated via live migration.

For premium performance, live migration is supported for premium file share accounts, but not for premium block blob or premium page blob accounts.

If your account uses RA-GRS, then you need to first change your account's replication type to either LRS or GRS before proceeding with a live migration. This intermediary step removes the secondary read-only endpoint provided by RA-GRS.

While Azure handles your request for live migration promptly, there's no guarantee as to when a live migration will complete. If you need your data migrated to ZRS by a certain date, then Azure recommends that you perform a manual migration instead. Generally, the more data you have in your account, the longer it takes to migrate that data.

You must perform a manual migration if:

  • You want to migrate your data into a ZRS storage account that is located in a region different than the source account.
  • Your storage account is a premium page blob or block blob account.
  • You want to migrate data from ZRS to LRS, GRS or RA-GRS.
  • Your storage account includes data in the archive tier.

You can request live migration through the Azure Support portal.

Important

If you need to migrate more than one storage account, create a single support ticket and specify the names of the accounts to convert on the Details tab.

Note

Premium file shares are available only for LRS.

GZRS storage accounts do not currently support the archive tier. See Hot, Cool, and Archive access tiers for blob data for more details.

Managed disks are only available for LRS and cannot be migrated to ZRS. You can store snapshots and images for standard SSD managed disks on standard HDD storage and choose between LRS and ZRS options. For information about integration with availability sets, see Introduction to Azure managed disks.

Costs associated with changing how data is replicated

The costs associated with changing how data is replicated depend on your conversion path. Ordering from least to the most expensive, Azure Storage redundancy offerings include LRS, ZRS, GRS, RA-GRS, GZRS, and RA-GZRS.

For example, going from LRS to any other type of replication will incur additional charges because you are moving to a more sophisticated redundancy level. Migrating to GRS or RA-GRS will incur an egress bandwidth charge at the time of migration because your entire storage account is being replicated to the secondary region. All subsequent writes to the primary region also incur egress bandwidth charges to replicate the write to the secondary region. For details on bandwidth charges, see Azure Storage Pricing page.

If you migrate your storage account from GRS to LRS, there is no additional cost, but your replicated data is deleted from the secondary location.

Important

If you migrate your storage account from RA-GRS to GRS or LRS, that account is billed as RA-GRS for an additional 30 days beyond the date that it was converted.

See also