`b2 upload-file` does not calculate SHA1 automatically for large files if it's not been provided by `--sha1`.

未关闭
#539 8 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
cli, cloud

调研方向

The payload names no files or tests. Start from the b2 upload-file command and how it handles the --sha1 option. The issue offers three unresolved options: compute SHA1 by default, add an opt-in flag such as --autocalc-sha1, or expose server-side per-segment hashes. No option has been chosen, and the thread has been inactive for about 2100 days, so a maintainer decision is needed before any code change.

由索引模型根据 Issue 内容生成。

描述

I know this issue has been reported and being declined multiple times for various reasons. But I like to tell more reasons why I need this -- auto-calculation of SHA1 by default.


I think one important thing is missing in older threads.

We upload files to use them later. Having no error on uploading is actually only half-work and not really helpful to archive integrity when I downloaded the file. Integrity scenario should include the case after the file after downloaded.

After downloading, the only way to verify integrity of downloaded file is its SHA1 hash. Missing SHA1 means no way to verify whether the download file is fine or damaged. (please correct me if I'm wrong!) Therefore, I think Backblaze should require SHA1 for all uploaded file. Missing SHA1 should be treated as incomplete upload. (now I started to worry about how Backblaze personal/business backup product deals with integrity of recovered backup.)

IMO, with that in mind, option --sha1 should become an overriding switch rather than an optional attachment. Users want b2 command would calculate SHA1 automatically if they consider "full integrity" and --sha1 overriding has not been provided.

If you do not provide SHA1 (regardless of verified by server or your own provision), your upload is incomplete.


If b2 command line cannot accept behavioral modification, I think you can provide extra switch like --autocalc-sha1.


Or Backblaze can provide access to SHA1 hashes for original uploading segments. (if it exists...) I don't know how files are stored on server-side, but if Backblaze keeps SHA1 hashes for original segments and the range of each segments, it's easy to verify on client side. If this is possible, everything is done simply and beautifully. Nothing is really required more.

主要语言
Python
星标
638
派生
138
平均合并
8 小时 27 分钟
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Backblaze/B2_Command_Line_Tool 的其他 Issue

查看 Backblaze/B2_Command_Line_Tool 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。