Skip to content

Make rclone more robust to false-negatives with local copies and --size-only #6206

Closed

Description

@Jwink3101

The associated forum post URL from https://forum.rclone.org

https://forum.rclone.org/t/does-size-only-account-for-local-sparse-files-properly/31022/5

What is your current rclone version (output from rclone version)?

rclone v1.58.1
- os/version: darwin 10.15.7 (64 bit)
- os/kernel: 19.6.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.17.9
- go/linking: dynamic
- go/tags: cmount

What problem are you are trying to solve?

(theoretical I think but...) if doing a copy from a remote to local with multiple streams and --size-only (either explicit or implied by the remote, e.g., WebDAV), it is conceivable for an interrupted transfer to not get restarted since it's "size" is correct even if the content is not

How do you think rclone should be changed to solve that?

Either add an extra null byte that gets truncated or withhold the very last byte until the rest of the transfer is complete. This way, the size of the file always mismatches until completed

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Activity

  1. ncw commented on May 31, 2022

    @ncw
    Member

    This is a good idea. Rclone backends don't currently have a truncate method so withholding the last byte until all the the multipart streams have finished would probably be easiest.

  2. added this to the Help Wanted milestone on Jun 1, 2022
  3. added a commit that references this issue on Jun 28, 2022
    6d9b025
  4. ncw commented on Jun 23, 2023

    @ncw
    Member

    In 5c594fe we implemented transfers to a temporary file name on the local, ftp and sftp backends unless the --inplace flag is not used.

    I think this effectively fixes this issue so I will close it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions