KB: Copy Blob between Azure Storage Accounts

Step 1: Set source storage context

$src = New-AzureStorageContext -StorageAccountName “storage account name” -StorageAccountKey “storage account key

Step 2: Set destination storage context

$dest = New-AzureStorageContext -StorageAccountName “storage account name” -StorageAccountKey “storage account key

Step 3: Start async copy

Start-AzureStorageBlobCopy -SrcUri “source blob URI” -SrcContext $src -DestContainer “destination container name” -DestContext $destContext -DestBlob “destination blob name

Step 4: Check completion status

Get-AzureStorageBlobCopyState -Blob “destination blob name” -Container “destination container name” -Context $dest

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s