Azure 存储表副本

问题描述

我在使用 azure Azcopy 时遇到问题。这是我的场景。 我有 2 个存储帐户,我将其命名为 storage1 和 storage2。

Storage1 包含多个表中的一些重要数据,我想要做的..是能够将 storage1 中的所有表复制到 storage2(有备份)。

我尝试了两种不同的方法

  • Azcopy
  • Azure 数据工厂

使用 Azure Data Factory 我没有任何特别的问题使它工作,我能够将所有 blob 从 storage1 移动到 data Factory 但 II 无法移动表并且没有线索是否可以用 python 来做到这一点。

使用 Azcopy 我的运气为零。当我运行此命令时,我在 IAM Blob Storage Data contributor 和终端中给了自己许可:

azcopy cp 'https://storage1.table.core.windows.net/Table1' 'https://storage2[...]-Key'

我收到权限错误

在这个特定场景中,我希望能够使用 Azcopy,因为它比数据工厂更简单,因为我需要将这些表从一个存储移动到另一个

谁能帮助我了解我在使用 azcopy 时做错了什么?

编辑: 这是我尝试使用 azcopy 复制表时的错误

INFO: The parameters you supplied were Source: 'https://storage1.table.core.windows.net/[SAS]' of type Local,and Destination: 'https://storage2.table.core.windows.net/[SAS]' of type Local
INFO: Based on the parameters supplied,a valid source-destination combination Could not automatically be found. Please check the parameters you supplied.  If they are correct,please specify an exact source and destination type using the --from-to switch. Valid values are two-word phases of the form BlobLocal,LocalBlob etc.  Use the word 'Blob' for Blob Storage,'Local' for the local file system,'File' for Azure Files,and 'BlobFS' for ADLS Gen2. If you need a combination that is not supported yet,please log an issue on the Azcopy GitHub issues list.

Failed to parse user input due to error: the inferred source/destination combination Could not be identified,or is currently not supported

解决方法

如果要将所有存在的表复制到 abc 容器到 xyz 容器。使用简单的复制活动,在创建数据集时只需提供将所有内容(即所有表)复制到 xyz 容器的文件夹路径。

我想从第 30 分钟开始观看以下视频。这将有助于您的场景。 https://youtu.be/m6wyB-Hm3j0