Skip to content

Commit f7acc0b

Browse files
committed
OR preview
1 parent c048f25 commit f7acc0b

File tree

3 files changed

+62
-25
lines changed

3 files changed

+62
-25
lines changed

articles/storage/blobs/TOC.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@
165165
- name: Change feed
166166
href: storage-blob-change-feed.md
167167
- name: Point-in-time restore
168-
href: point-in-time-restore-overview.md
168+
href: point-in-time-restore-overview.md
169+
- name: Object replication
170+
href: object-replication-overview.md
169171
- name: Access and performance tiers
170172
items:
171173
- name: Access tiers
@@ -398,7 +400,9 @@
398400
- name: Process change feed logs
399401
href: storage-blob-change-feed-how-to.md
400402
- name: Enable point-in-time restore
401-
href: point-in-time-restore-manage.md
403+
href: point-in-time-restore-manage.md
404+
- name: Configure object replication for block blobs
405+
href: object-replication-configure.md
402406
- name: Manage disaster recovery
403407
items:
404408
- name: Check the Last Sync Time property

articles/storage/blobs/object-replication-configure.md

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Before you configure object replication, create the source and destination stora
2626

2727
Also create the source and destination containers in their respective storage accounts, if they do not already exist.
2828

29+
Finally, enable the following prerequisites:
30+
31+
- [Change feed (preview)](storage-blob-change-feed.md) on the source account
32+
- [Blob versioning (preview)](versioning-overview.md) on the source and destination accounts
33+
2934
# [Azure portal](#tab/portal)
3035

3136
To create a replication policy and add replication rules in the Azure portal, follow these steps:
@@ -56,30 +61,60 @@ To create a replication policy and add replication rules in the Azure portal, fo
5661

5762
# [PowerShell](#tab/powershell)
5863

59-
Install and import the PowerShell preview module which supports object replication:
64+
### Install the preview module
6065

61-
Install-Module Az.Storage –Repository PSGallery -RequiredVersion 1.13.4-preview –AllowPrerelease –AllowClobber –Force
66+
To create a replication policy and add replication rules using PowerShell, first install version [1.14.1-preview](https://www.powershellgallery.com/packages/Az.Storage/1.14.1-preview) of the Az.Storage PowerShell module. Follow these steps to install the preview module:
6267

63-
Import-Module Az.Storage -RequiredVersion 1.13.4
68+
1. Uninstall any previous installations of Azure PowerShell from Windows using the **Apps & features** setting under **Settings**.
6469

65-
To start working with Azure PowerShell, sign in with your Azure credentials.
70+
1. Make sure that you have the latest version of PowerShellGet installed. Open a Windows PowerShell window, and run the following command to install the latest version:
6671

67-
Connect-AzAccount
72+
```powershell
73+
Install-Module PowerShellGet –Repository PSGallery –Force
74+
```
6875
69-
Enable both Change feed and Versioning on the source storage account. Make sure
70-
you’re already registered for [Change feed](https://azure.microsoft.com/blog/change-feed-support-now-available-in-preview-for-azure-blob-storage/) and Versioning capabilities.
76+
1. Close and reopen the PowerShell window after installing PowerShellGet.
7177
72-
Update-AzStorageBlobServiceProperty -ResourceGroupName \<resource group\> -StorageAccountName \<source storage account\> -EnableChangeFeed \$true -IsVersioningEnabled \$true
78+
1. Install the latest version of Azure PowerShell:
7379
74-
Enable Versioning on the destination storage account.
80+
```powershell
81+
Install-Module Az –Repository PSGallery –AllowClobber
82+
```
7583
76-
Update-AzStorageBlobServiceProperty -ResourceGroupName \<resource group\> -StorageAccountName \<destination storage account\> -IsVersioningEnabled \$true
84+
1. Install the Az.Storage preview module:
7785
78-
Create source and destination containers you’re planning to replicate the data between.
86+
```powershell
87+
Install-Module Az.Storage -Repository PSGallery -RequiredVersion 1.14.1-preview -AllowPrerelease -AllowClobber -Force
88+
```
89+
90+
For more information about installing Azure PowerShell, see [Install Azure PowerShell with PowerShellGet](/powershell/azure/install-az-ps).
91+
92+
### Configure replication policy and rules
93+
94+
Before running the example, use the Azure portal or an Azure Resource Manager template to enable blob versioning on the source and destination accounts.
95+
96+
```powershell
97+
# Sign in to your Azure account.
98+
Connect-AzAccount
99+
100+
# Set resource group and account variables.
101+
$rgName = "<resource-group>"
102+
$srcAccountName = "<source-storage-account>"
103+
$srcContainerName = "<source-container>"
104+
$destAccountName = "<destination-storage-account>"
105+
$destContainerName = "<destination-container>"
106+
107+
# Enable change feed on the source account.
108+
Update-AzStorageBlobServiceProperty -ResourceGroupName $rgName `
109+
-StorageAccountName $srcAccountName `
110+
-EnableChangeFeed $true
111+
112+
# View the service settings.
113+
Get-AzStorageBlobServiceProperty -ResourceGroupName $rgName `
114+
-StorageAccountName $accountName
115+
```
79116

80-
Get-AzStorageAccount -ResourceGroupName \<resource group\> -StorageAccountName \<source account\> \| New-AzStorageContainer \<source container\>
81117

82-
Get-AzStorageAccount -ResourceGroupName \<resource group\> -StorageAccountName \<destination account\> \| New-AzStorageContainer \<destination container\>
83118

84119
Create a new replication rule and specify the desired prefix and replication behavior for the objects, that existed prior to configuring object replication.
85120

@@ -238,12 +273,6 @@ az storage account ors-policy remove \\
238273

239274
---
240275

241-
## Python SDK
242-
243-
<https://github.com/zfchen95/azure-rest-api-specs-pr/blob/ors1018/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountUpdateObjectReplicationPolicyOnDestination.json>
244-
245-
<https://github.com/zfchen95/azure-rest-api-specs-pr/blob/ors1018/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json>
246-
247276
## Next steps
248277

249278
- [Object replication (preview)](object-replication-overview.md)

articles/storage/blobs/object-replication-overview.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Object replication (preview) asynchronously copies block blobs between a source
2121
- **Optimizing data distribution.** You can process or analyze data in a single location and then replicate just the results to additional regions.
2222
- **Optimizing costs.** After your data has been replicated, you can reduce costs by moving it to the archive tier using life cycle management policies.
2323

24+
To learn how to configure object replication, see [Configure object replication (preview)](object-replication-configure.md).
25+
2426
## How object replication works
2527

2628
Object replication asynchronously copies a specified set of block blobs from a container in one storage account to a container in another account. Object replication happens asynchronously and is [eventually consistent](https://en.wikipedia.org/wiki/Eventual_consistency). After you configure object replication on the source account, Azure Storage checks the change feed every minute(???) and replicates any write or delete operations to the destination account. Replication latency depends on the size of the block blob being replicated.
@@ -60,10 +62,12 @@ During the preview, there are no additional costs associated with replicating da
6062

6163
Object replication requires that the following Azure Storage features are enabled:
6264

63-
- [Change feed (preview)](storage-blob-change-feed.md)
64-
- [Blob versioning (preview)](versioning-overview.md)
65+
Before you configure object replication, enable its prerequisites. Change feed must be enabled on the source account, and blob versioning must be enabled on both the source and destination account. For more information about enabling these features, see these articles:
66+
67+
- [Enable and disable the change feed](storage-blob-change-feed.md#enable-and-disable-the-change-feed)
68+
- [Enable and manage blob versioning](versioning-enable.md)
6569

66-
Enable these features for the storage account before you enable object replication. Be sure to register for the change feed and blob versioning previews before you enable them.
70+
Be sure to register for the change feed and blob versioning previews before you enable them.
6771

6872
Enabling change feed and blob versioning may incur additional costs. For more details, refer to the [Azure Storage pricing page](https://azure.microsoft.com/pricing/details/storage/).
6973

@@ -136,4 +140,4 @@ az feature list -o table --query "[?contains(name, 'Microsoft.Storage/Versioning
136140

137141
## Next steps
138142

139-
- [Configure object replication (preview)](object-replication-manage.md)
143+
- [Configure object replication (preview)](object-replication-configure.md)

0 commit comments

Comments
 (0)