Description
Synopsis
Currently --max-delete in bisync has syntax different from the rest of rclone - it means a percentage. Instead, it should have an optional trailing % sign like --max-delete 50% to mean the maximum share of deleted files. Without % it should set a maximum number of the total number of files deleted rather than a percentage like the rest of rclone. The default should stay as is i.e. 50%. This behavior should be retained in the bisync rc handler.
We could later implement the % trick in the rest of rclone too (out of scope for this request).
Prior discussions
iva: I made bisync use the generic --max-delete flag but as a percentage in range 0..100 rather than absolute number of deleted objects. Maybe it's better to rename it as --max-delete-percent or --bisync-max-delete?
ncw: I think --max-delete should probably set a maximum of the total number of files deleted rather than a percentage. Could you use it that way in bisync? Maybe it could have an optional trailing % sign so --max-delete 5% and we could implement that in the rest of rclone too.
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]bisync: align syntax of the `--max-delete` flag[/-][+]bisync: align `--max-delete` flag semantics[/+]ivandeex commentedon Oct 25, 2021
Request for related feature:
https://forum.rclone.org/t/do-nothing-when-more-then-50-is-changed/26583
nielash commentedon Sep 30, 2026
I think the ship has sailed on this one. Bisync's
--max-deletehas been a percentage since the beginning, and changing it to a file count now would silently change what a safety check means for everyone already using it ----max-delete 10would go from 10% to 10 files, with no error or warning.The real problem is that the same flag means something different for
syncandbisync. Neither meaning is wrong, but the clean fix is a rename, which is a breaking change, so I've added it to Breaking changes for v2 instead.In the meantime, #10015 (in review, as of this writing) makes a couple of related improvements:
--max-deleteabove 100 is now an error inbisync, enforcing the 0-100 range this was designed with. Previously, a value like--max-delete 500was treated as 100%, which turned off the check.--max-deletethe same way as the command line, including the 50% default this issue asked to keep for the rc.So I'm going to close this one.
bisync: fix rc ignoring global --dry-run and --max-delete settings
bisync: fix rc ignoring global --dry-run and --max-delete settings
bisync: fix rc ignoring global --dry-run and --max-delete settings
bisync: fix rc ignoring global --dry-run and --max-delete settings
bisync: fix rc ignoring global --dry-run and --max-delete settings