Skip to content

Enhancement: When using --checksum, files that differ in size should be uploaded first. #725

Closed

Description

@Wowfunhappy

Let's say I'm uploading a large folder to Amazon Cloud Drive. Some files differ in size, while others are the same size but contain different data. In order to sync properly, I will have to use the --checksum option.

I spend some time uploading files, then need to stop the sync for some reason. When I resume, rclone will spend the next couple of hours checksumming the files I've already uploaded (I guess it traverses directories in the same order every time?), thus not making use of my available bandwidth. Meanwhile, other unuploaded files differ in size and will need to be transferred, regardless of their checksum.

In order to maximize use of resources and perform syncs as quickly as possible, files that differ in size should always be transferred first. Rclone can checksum other files while the transfer is going on.

Activity

  1. ncw commented on Sep 13, 2016

    @ncw
    Member

    rclone traverses directories in a somewhat non-deterministic (random) fashion. The way the architecture of rclone works (it streams everything) I can't easily do what you ask.

    Here are some ideas...

    Assuming you normally run

    rclone sync --checksum /path/to/source acd:dest
    

    you could use

    rclone copy --max-age 1d --checksum /path/to/source acd:dest
    

    to freshen up any files which were modified in the last day. (Don't use rclone sync here you don't want this deleting any files.) Then finish this off with a

    rclone sync --size-only /path/to/source acd:dest
    

    to copy anything missed and delete deleted files. Once a month you could run

    rclone sync --checksum /path/to/source acd:dest
    

    to check if it has been working properly. You can also use

    rclone check /path/to/source acd:dest
    

    for this purpose.

    #626 would help with this too.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions