Object replication asynchronously copies block blobs between a source storage account and a destination account. Because block blob data is replicated asynchronously, the source account and destination account are not immediately in sync. There's currently no SLA on how long it takes to replicate data to the destination account. In some cases, you might need to check the replication status, in this article we will go over the different methods that you can use to check and monitor the object replication status for the storage account.
Using Azure Portal
To check the replication status for a blob in the source account in the Azure portal, follow these steps:
Navigate to the source account in the Azure portal.
Locate the container that includes the source blob.
Select the blob to display its properties. If the blob has been replicated successfully, you'll see in theObject replicationsection that the status is set toComplete. The replication policy ID and the ID for the rule governing object replication for this container are also listed
Using Rest API
We can utilize the Get Blob Properties API to return all the replication details for a specific blob, you can construct the Get Blob Properties request as follows.
The response header for the request header will contain the following details about the object replication:
Version 2019-12-12 and later, returned only for block blobs.policy-idis a GUID value that represents the identifier of an object replication policy on the storage account.rule-idis a GUID value that represents the identifier of a policy rule on the blob container. If the account isObjectReplication-enabled, the value of this header represents the replication status of blob with the given policy and rule identifiers, eithercompleteorfailed.
Version 2019-12-12 and later, returned only for block blobs. If the account isObjectReplication-enabled, the value of this header represents the policy that governs the replication.
You can monitor the object replication status for multiple blobs using Log Analytics Workspace queries by checking the storage account for the copy operation from source storage to the destination storage account. The following steps can be used to achieve this: