[Feature request] sync --abort-if / --max-deletes
Open
@ishuah is already working on this.
Since May 6, 2018.
bandwidth
enhancement
UX
- Dominant language
- Go
- Stars
- 59.8k
- Forks
- 5.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 48
Description
--abort-if NUM
--abort-if 0
If there are no files present in source do not delete files in dest.
--abort-if 10
If there are less then 10 files in source do not delete files in dest.
rsync
max-delete=NUM
This tells rsync not to delete more than NUM files or directo‐
ries. If that limit is exceeded, all further deletions are
skipped through the end of the transfer. At the end, rsync out‐
puts a warning (including a count of the skipped deletions) and
exits with an error code of 25 (unless some more important error
condition also occurred).
Beginning with version 3.0.0, you may specify --max-delete=0 to
be warned about any extraneous files in the destination without
removing any of them. Older clients interpreted this as "unlim‐
ited", so if you don’t know what version the client is, you can
use the less obvious --max-delete=-1 as a backward-compatible
way to specify that no deletions be allowed (though really old
versions didn’t warn when the limit was exceeded).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.