如何检查正确上传的 Azure 存储 BLOB 文件? [英] How to check Azure Storage BLOB file uploaded correctly?

查看:33
本文介绍了如何检查正确上传的 Azure 存储 BLOB 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用 AzCopy 实用程序将一个大型 zip 存档上传到 Azure 存储 BLOB 容器(约 9GB).现在我想检查它是否正确.我可以从 Azure 门户获取文件的CONTENT-MD5"值.然后我需要在我这边计算这个,对吗?有没有其他方法来检查有效性(除了下载这个文件)?它是使用 7zip 实用程序存档的,该实用程序没有 MD5 的哈希算法.

I've uploaded a large zip archive to Azure Storage BLOB container, ~9GB, using AzCopy utility. Now I'd like to check if it is correct. I can get "CONTENT-MD5" value from Azure Portal for the file. Then I need to calculate this on my side, right? Are there any other ways to check validity (except downloading this file)? It was archived using 7zip utility which doesn't have hash algo for MD5.

推荐答案

Azure 存储 Blob 服务不为每个实时 Blob 内容维护上传的 Blob 的Content-MD5"属性.实际上,它是在上传过程中由 AzCopy 计算的,并在 AzCopy 完成上传时设置为目标 blob.因此,如果您真的要验证数据完整性,则必须使用带有/CheckMD5 选项的 AzCopy 下载文件,然后将下载的文件与本地原始文件进行比较.

"Content-MD5" property of the uploaded blob is not maintained by Azure Storage Blob Service per real-time blob content. Actually, it's calculated by AzCopy during uploading and set to the target blob when AzCopy finishes uploading. Therefore, if you really want to validate the data integrity, you have to download the file using AzCopy with /CheckMD5 option, and then compare the downloaded file with your local original file.

但是,鉴于 AzCopy 已尽最大努力保护传输过程中的数据完整性,上述验证步骤可能是多余的,强烈不建议这样做,除非在您的场景下数据完整性比性能重要得多.

However, given AzCopy has made its best effort to protect data integrity during transferring, the validation step above is probably redundant and strongly not recommended unless data integrity is much more important than performance under your scenario.

这篇关于如何检查正确上传的 Azure 存储 BLOB 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆