azure - 我无法将 Azure 存储标准迁移到高级

标签 azure blob azure-storage azure-blob-storage

我需要将 Azure Blob 存储从标准迁移到高级

我尝试执行

azcopy.exe copy [source with SAS] [destination with SAS] --recursive

并返回此错误:

RESPONSE Status: 404 The specified blob does not exist.
   Content-Length: [216]
   Content-Type: [application/xml]
   Date: [Tue, 08 Oct 2019 16:34:11 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [BlobNotFound]
   X-Ms-Request-Id: [5f5b409d-d01c-000e-1df6-7d67ae000000]
   X-Ms-Version: [2018-11-09]

那我试试

azcopy.exe copy [source with SAS] [destination with SAS] --blob-type PageBlob --recursive

所有文件归档的原因是:

Content-Length: [0]                                                                                                                                                                                                                          
User-Agent: [AzCopy/10.2.1 Azure-Storage/0.7 (go1.12; Windows_NT)]                                                                                                                                                                           
X-Ms-Blob-Cache-Control: []                                                                                                                                                                                                                  
X-Ms-Blob-Content-Disposition: []                                                                                                                                                                                                            
X-Ms-Blob-Content-Encoding: []                                                                                                                                                                                                               
X-Ms-Blob-Content-Language: []                                                                                                                                                                                                               
X-Ms-Blob-Content-Length: [777475]                                                                                                                                                                                                           
X-Ms-Blob-Content-Type: [image/jpeg]                                                                                                                                                                                                         
X-Ms-Blob-Sequence-Number: [0]                                                                                                                                                                                                               
X-Ms-Blob-Type: [PageBlob]                                                                                                                                                                                                                   
X-Ms-Client-Request-Id: [...]                                                                                                                                                                               
X-Ms-Version: [2018-03-28]                                                                                                                                                                                                                   
--------------------------------------------------------------------------------                                                                                                                                                             
RESPONSE Status: 400 The value for one of the HTTP headers is not in the correct format.                                                                                                                                                     
Content-Length: [337]                                                                                                                                                                                                                        
Content-Type: [application/xml]                                                                                                                                                                                                              
Date: [Tue, 08 Oct 2019 16:29:51 GMT]                                                                                                                                                                                                        
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]                                                                                                                                                                                       
X-Ms-Error-Code: [InvalidHeaderValue]                                                                                                                                                                                                        
X-Ms-Request-Id: [...]                                                                                                                                                                                      
X-Ms-Version: [2018-03-28]  

如何将 block blob 转换为 pageblob?

谢谢

最佳答案

我可以在我这边重现您的问题,该问题是由于源容器中的 block blob 大小不是 512 字节的倍数引起的。

实际上,在运行 Azcopy 命令时,INFO 已经提到了这一点。

enter image description here

因此,如果您想这样做, block Blob 大小必须是 512 字节的倍数。我测试了 512 字节倍数的文件的命令,它工作正常。

enter image description here

我的源容器:

enter image description here

我的目标容器:

enter image description here

关于azure - 我无法将 Azure 存储标准迁移到高级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58290589/

相关文章:

azure - 如何构建 Azure 表来保存用户消息

node.js - Azure Blob 存储 - Node.JS - createReadStream() 作为 POST 请求表单中的文件

azure - 以特定方式自定义 Azure 搜索评分

mysql - 在 mysql 导出中将 blob 转换为文本

java - 使用 Java 从 oracle DB 中保存/检索巨大 blob 的性能问题

xml - 将 oracle blob 转换为 xml 类型

powershell - Azure存储API : download entire folder/prefix/directory

azure - 将所有数据从我的帐户转移到同一 Azure 订阅中的另一个帐户

asp.net - 为什么 Azure 部署在 Windows 2012 Server 上比在 Windows 2008 Server 上慢

powershell - 如何通过 Get-AzureStorageBlobContent 仅下载最新文件