5

I am trying to copy some blob files from one storage account to another one. I am using AzCopy in order to fulfill this goal.

The process works for copying files between containers within the same storage account, but not between different storage accounts.

The command I am issuing is:

AzCopy /Source:https://<storage_account1>.blob.core.windows.net/<container_name1>/<path_to_desired_blobs> /Dest:https://<storage_account2>.blob.core.windows.net/<container_name2>/<path_to_store>/ /SourceKey:<source_key> /DestKey:<dest_key> /Pattern:<some_pattern> /S

The error I am getting is the following:

The remote server returned an error: (400) Bad Request.

Could not verify the copy source within the specified time.

RequestId:

Time:2016-04-01T19:33:01.0527460Z

The only difference between the two storage accounts is that one is Standard, whereas the other one is Premium.

Any help will be appreciated!

Community
  • 1
  • 1
Mirel Vlad
  • 2,032
  • 3
  • 27
  • 35

3 Answers3

2

From your description, you're trying to copy Block Blob from source account to Page Blob in destination account, which is not supported in Azure Storage Service and AzCopy.

To work around it, you can firstly use AzCopy to download the Block Blobs from source account to local file system, and then upload them from local file system to destination account with option /BlobType:Page (this option is only valid when uploading from local to blob).

Zhaoxing Lu
  • 6,319
  • 18
  • 41
  • This results in the following error: File size 339MB is invalid for PageBlob, must be a multiple of 512 bytes. – Mirel Vlad Apr 06 '16 at 07:06
  • Premium Storage Account only supports Page Blob, and size of Page Blobs must be a multiple of 512 bytes. If your blob size doesn't satisfy the requirement, I'd suggest you to double confirm you do need Premium Storage Account as the destination account. – Zhaoxing Lu Apr 06 '16 at 07:44
1

Premium Storage only supports page blobs. Please confirm that you are copying page blobs from standard to premium storage account. Also, specify the BlobType parameter to "page" in order to copy the data as page blobs into destination premium storage account.

  • No working. I receive the following error: [ERROR] The syntax of the command is incorrect. The "BlobType" parameter is only valid when copying from local file system or File Service to Blob Service. – Mirel Vlad Apr 02 '16 at 16:18
  • /BlobType is only supported while uploading from local to Blob, so it's not valid solution here. Please do confirm that the source blobs on your standard storage account are Page Blob. – Zhaoxing Lu Apr 03 '16 at 12:53
  • @ZhaoxingLu-Microsoft The source blobs are of type Block. – Mirel Vlad Apr 03 '16 at 13:24
0

From the description, I am assuming your source blob is a block blob. Azure's "Async Copy Blob" process (which is used by AzCopy as the default method) preserves the blob type. That is, you cannot convert a blob type from Block to Page through async copy blob.

Instead, can you try AzCopy again with "/SyncCopy" option along with "/BlobType:page" parameter? That might help change the destination blob type to Page.

(If that doesn't work, only other solution would be to first download the blob, and then upload it with "/BlobType:page")

  • Adding the "/SyncCopy" option results in the same output: [ERROR] The syntax of the command is incorrect. The "BlobType" parameter is only valid when copying from local file system or File Service to Blob Service. – Mirel Vlad Apr 03 '16 at 08:51
  • And downloading 250GB of blobs files and then uploading them seems a lengthy (also inefficient) operation. But if there is no other option, then I shall go for this one. – Mirel Vlad Apr 03 '16 at 08:53