config: emit blake3sum_command for sftp so --hash blake3 syncs work#127
Merged
Conversation
rclone's sftp backend only autodetects md5sum/sha1sum, never a BLAKE3 command, so every non-shallow sync — which runs `rclone copy --checksum --hash blake3` — aborted with "hash type not supported", even when the remote has b3sum installed. Render `blake3sum_command = b3sum` in every sftp section so rclone can compute server-side BLAKE3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every non-shallow
squirrel syncto an sftp destination runsrclone copy --checksum --hash blake3(sync/sync.go:603,sync/node.go:586). rclone's sftp backend, however, only autodetectsmd5sum/sha1sum— it never discovers a BLAKE3 command (the NAS hasb3sum, but rclone probes a different name). So the transfer aborts immediately:rclone hashsum blake3 <remote>confirms it:hash unsupported: hash type not supported. With the02ffdc1guard ("downgrade a --checksum run that silently lost its hash"), squirrel correctly fails the run rather than recording an unverified sync — so a brand-new sftp volume can never complete its first sync.Fix
Render
blake3sum_command = b3sumin every sftp section of the generatedrclone.conf(config/destinations.go,RcloneSection). rclone 1.74's sftp backend exposes--sftp-blake3sum-command/ config keyblake3sum_commandfor exactly this.b3sumis the canonical BLAKE3 CLI and must be on the remote's PATH (squirrel already assumes this — seenas/first-backup-pipeline.md).Harmless for sftp destinations that verify with another algo: rclone only invokes
b3sumwhen BLAKE3 is requested.Testing
TestRcloneSectionSFTPEmitsBlake3sumCommand: sftp sections carry the line; s3 (fixed provider checksum) does not.config,sync) for the added line.go vet ./...clean;go test ./...green.