首页 > 解决方案 > Azure 存储表副本

问题描述

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

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

我尝试了两种不同的方法:

由于Azure Data Factory我没有任何特别的问题可以使它工作,我能够将所有 blob 从 storage1 移动到data Factory但我无法移动表并且不知道这是否可以用 python 来完成。

我的AzCopy运气为零。Blob Storage Data contributor当我运行此命令时,我在 IAM 和终端中授予了自己权限:

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

标签: azureazure-storageazure-blob-storageazure-data-factoryazure-table-storage

解决方案


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

我想从第 30 分钟观看下面的视频。它将在您的场景中有所帮助。 https://youtu.be/m6wyB-Hm3j0


推荐阅读