Skip to content

Ability to abort after N errors #4670

Done

Description

@nununo

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

rclone v1.53.1
- os/arch: linux/amd64
- go version: go1.15

What problem are you are trying to solve?

I'm running rclone through ansible and, due to the way ansible works, I can only see the resulting stdout once the command finishes. Sometimes all the files being sync'd have wrong permissions and are therefore skipped due to a permission denied error. But I can only find out about it after the whole command is finished, which can take a long time.

Example:

2020/10/11 00:22:36 ERROR : restic: failed to open directory "restic": open /mnt/caixote/restic: permission denied
2020/10/11 00:22:36 ERROR : 1.txt: Failed to calculate src hash: hash: failed to open: open /mnt/caixote/1.txt: permission denied

I would like that rclone could be configured to abort after the first error (permission denied or other).

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

Introducing flag --max-errors-before-abort with a number argument. And keep an error counter which would abort after reaching the provided number.

Activity

  1. added this to the Help Wanted milestone on Oct 11, 2020
  2. ncw commented on Oct 13, 2020

    @ncw
    Member

    I think --max-errors would fit in well with the --max-transfer and --max-duration flags.

    It could also obey the hard/soft cutoff.

  3. MarcosFelipeBC commented on Oct 14, 2020

    @MarcosFelipeBC

    I would like to try to solve this issue! Could it be valid to hacktoberfest?

  4. darthShadow commented on Oct 14, 2020

    @darthShadow
    Member

    Yeah, that shouldn't be a problem. Ping me when you have submitted the PR so I can mark it for hacktoberfest.

  5. MarcosFelipeBC commented on Oct 19, 2020

    @MarcosFelipeBC

    --max-errors is going to be an rclone sync flag or a global flag?

  6. ncw commented on Oct 22, 2020

    @ncw
    Member

    --max-errors is going to be an rclone sync flag or a global flag?

    It should be a global flag I think.

  7. MarcosFelipeBC commented on Oct 24, 2020

    @MarcosFelipeBC

    All right! i think that maybe I wouldn't be able to work on this as soon as I wanted, so if someone else wants to take this no problem!

    But if this issue stay open longer, maybe I could take this later

  8. ncw commented on Nov 25, 2026

    @ncw
    Member

    I've merged @hdsfat fix for this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.77.0

  9. added a commit that references this issue on Nov 25, 2026
    5417c54
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