Assume the following config:
[crypttest]
type = crypt
remote = sftptest:a/b/c
password = [redacted]
[sftptest]
type = sftp
host = [redacted]
user = [redacted]
port = [redacted]
pass = [redacted]
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum
[aliastest]
type = alias
remote = sftptest:a/b/c
And assume the typical Synology NAS format mentioned in the docs where the SSH path has an extra /volume1
that the SFTP path does not.
The following commands have the following results:
rclone copy a sftptest:a --sftp-path-override '/volume1'
Fails.
rclone copy a sftptest:a --sftp-path-override '/volume1/a'
Succeeds.
rclone copy f aliastest:d/e/f --sftp-path-override '/volume1'
Fails.
rclone copy f aliastest:d/e/f --sftp-path-override '/volume1/a/b/c'
Fails.
rclone copy f aliastest:d/e/f --sftp-path-override '/volume1/a/b/c/d/e/f'
Succeeds.
rclone copy f crypttest:d/e/f --sftp-path-override '/volume1'
Fails.
rclone copy f crypttest:d/e/f --sftp-path-override '/volume1/a/b/c'
Fails.
rclone copy f crypttest:d/e/f --sftp-path-override '/volume1/a/b/c/d/e/f'
Fails.
rclone copy f crypttest:d/e/f --sftp-path-override '/volume1/a/b/c/e2dvum7tosiskgm13qioobd724/1fbvn12o0fm0ojkihl69f0rsrc/jounpnkjf4pnmlo6732gjeclls'
Succeeds.
(didn't use my real password -- don't worry.)
I also tried setting it from the path_override
config variable -- didn't seem to change anything.
Is this expected behavior? If so, is there any workaround? (Other than --ignore-checksum
)
In my opinion, it would be more intuitive if --sftp-path-override
were the path to the SFTP remote's root
, not the path to the root
+ subpath
+ wrapping-subpath
. In other words, in the above examples, this should suffice: --sftp-path-override '/volume1'
and rclone should be able to add the relative subpaths automatically (including unwrapping/unencrypting as necessary). That way, it could just be set once in the config, without needing to re-specify for each command. Perhaps this could be implemented as a new flag (for backward compatibility)?
Currently, the error is:
2023/07/16 23:04:20 ERROR : test.txt.yefanib2.partial: Failed to calculate dst hash: failed to calculate md5 hash: failed to run "md5sum /volume1/test.txt.yefanib2.partial": md5sum: /volume1/test.txt.yefanib2.partial: No such file or directory: Process exited with status 1
2023/07/16 23:04:20 ERROR : test.txt.yefanib2.partial: corrupted on transfer: md5 hash differ "098f6bcd4621d373cade4e832627b4f6" vs ""
Or, for crypt:
2023/07/17 00:13:27 ERROR : test.txt: Failed to copy: failed to read destination hash: failed to calculate md5 hash: failed to run "md5sum /volume1/1642p05ttgmjk9aem9iva6cbb3t51p80atv1a5ikhga1ro303g90": md5sum: /volume1/1642p05ttgmjk9aem9iva6cbb3t51p80atv1a5ikhga1ro303g90: No such file or directory: Process exited with status 1
rclone version:
rclone v1.64.0-DEV
- os/version: darwin 13.4.1 (64 bit)
- os/kernel: 22.5.0 (arm64)
- os/type: darwin
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.20.1
- go/linking: dynamic
- go/tags: none