none
Copy Azure Tables Between Storage Accounts

    Question

  • What is the best way to copy Azure tables from one storage account to another?

    My tables are large so I don't want to download them and upload them.

    I would like them to be copied in one action, if possible.

    One of my tables has 18 million rows.

    I tried AZCopy (preview release) without success.

    Thanks in advance...


    Ken

    Friday, July 10, 2015 5:30 PM

Answers

  • Actually, there is no server-side copy for Azure Table, so you have to export the table and then import the exported data into another table.

    AzCopy is a good tool for that:

    AzCopy /Source:https://myaccount.table.core.windows.net/srcTable/ /Dest:localFolder /SourceKey:key1

    AzCopy /Source:localFolder /Dest:https://myaccount.table.core.windows.net/destTable/ /DestKey:key2 /manifest:<The manifest file name shown in the output of previous command>

    For further information of AzCopy, you can refer to http://aka.ms/azcopy .

    If you hit any issues while using AzCopy, please feel free to contact me.

    Tuesday, July 14, 2015 3:16 AM

All replies

  • Thank you for your reply.

    I downloaded the tool, but I do not see how it can copy an entire table to another storage account.

    Can you walk me thru that?

    I have downloaded Azure Storage Explorer 6 Preview (6.0.3.1)

    Ken


    Ken

    Friday, July 10, 2015 7:32 PM
  • Anyway you have to export table to blob first by AZCopy (sorry my bad, didn't noticed that table copy is not available yet)

    AzCopy /Source:https://myaccount.table.core.windows.net/myTable/ /Dest:https://myaccount.blob.core.windows.net/mycontainer/ /SourceKey:key1 /Destkey:key2

    Then you can make a cross account blob copy by ASE or Azure PowerShell - http://blog.fedenko.info/2015/06/azure-copy-blob-storage-between.html 

    Links that may help: 

    https://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/#copy-entities-in-an-azure-table-with-azcopy-preview-version-only

    Windows Azure Table Storage Service – Migrating Tables Between Storage Accounts - https://alexandrebrisebois.wordpress.com/2013/06/20/windows-azure-table-storage-service-migrating-tables-between-storage-accounts/

    • Proposed as answer by Slava Fedenko Monday, July 13, 2015 12:36 AM
    Friday, July 10, 2015 9:15 PM
  • Thank you again.

    I will try this.

    I assume the last step would be to convert from the blob back to a table using AzCopy.

    I was hoping to do this in one step since my table is large.

    It sounds like I need to do it in 3 steps: table to blob, blob on one storage to blob on another storage, blob to table.

    Do you think I would get better thruput just writing a c# program to read from one table and write to the other?

    Ken


    Ken

    Friday, July 10, 2015 9:55 PM
  • According to the article I assume yes, you will get it done faster.

    The process is surprisingly fast compared to the migration of blob containers. When we copy a blob from one container to another, a command is queued and it can take some time to complete. Migrating Tables on the other hand, requires significantly more bandwidth, because we need to download the data from the source Tables and upload it into the target Tables located in the target Windows Azure Storage Account.

    Friday, July 10, 2015 10:00 PM
  • Actually, there is no server-side copy for Azure Table, so you have to export the table and then import the exported data into another table.

    AzCopy is a good tool for that:

    AzCopy /Source:https://myaccount.table.core.windows.net/srcTable/ /Dest:localFolder /SourceKey:key1

    AzCopy /Source:localFolder /Dest:https://myaccount.table.core.windows.net/destTable/ /DestKey:key2 /manifest:<The manifest file name shown in the output of previous command>

    For further information of AzCopy, you can refer to http://aka.ms/azcopy .

    If you hit any issues while using AzCopy, please feel free to contact me.

    Tuesday, July 14, 2015 3:16 AM