Question

Viswanatha Swamy P K on Fri, 06 Jun 2014 11:10:26


All,

Hope you are doing great. I have a storage account which is RA-GRS enabled. Which has couple of (IaaS based vms) .vhd. I have taken few snapshots on the VMs too.

Queries:

1. How do I copy the .vhds from secondary storage account to different account in primary location?

2. If I copy the .vhds. Does it copy all the snapshots which was taken?

Please advice. Many thanks!

Regards,

Swamy


Sponsored



Replies

Viswanatha Swamy P K on Fri, 06 Jun 2014 11:29:55


All,

Hope you are doing great. I have created a storage account with RA-GRS enabled. In this storage account I am have some .vhd blob. How can I copy .vhds from secondary location (Ex: West US) using power shell to another storage account in primary location (East US)? Please advice. Many thanks!

Regards,

Swamy

Jambor yao on Mon, 09 Jun 2014 07:21:04


Hi,

Please have a look at below article, it show us the powershell script about download all Blobs (with Snapshots) from One Windows Azure Storage Account, hope it helps, if not, please feel free follow up.

#http://gallery.technet.microsoft.com/scriptcenter/all-Blobs-with-Snapshots-3b184a79#content

Best Regards,

Jambor

Viswanatha Swamy P K on Thu, 10 Jul 2014 19:10:45


Hi Jambor,

Hope you are doing great. I am facing a problem.

1. Imagine I have a storage account with RA-GRS enabled. US East (Primary) and US West (Secondary)

2. I have created a VM in US East and taken couple of snapshots. Which means the .vhd and its snapshot will be replicated in the Secondary location.

3. Assume that Primary site is down. Not I want to read the .vhd and its snapshot from secondary and create VM in Primary location.

4. I tried the below code but it is throwing exception 404 Not found.

Please advice.

Regards,

Swamy

    $client.LocationMode =0


   

$createdBlob=$client.GetBlobReferenceFromServer($theDestBlobUrl)

   

Write-Output$createdBlob.SnapshotQualifiedStorageUri.PrimaryUri.AbsoluteUri

   

try


    {

       

$createdBlob.BreakLease()

    }

   

catch{}

   

$blobUri125=New-ObjectSystem.Uri($theUrl)

   

$client.LocationMode =0


   

$createdBlob.StartCopyFromBlob($blobUri125.AbsoluteUri)


   

$blobReference=$client.GetBlobReferenceFromServer($theUrl)


Viswanatha Swamy P K on Thu, 10 Jul 2014 19:14:01


Jambor,

Tomorrow I will try the code given in the link you have specified. Many thanks!

Regards,

Swamy