sync: add --track-renames-strategy leaf

See: https://forum.rclone.org/t/how-to-minimize-bandwith-w-r-t-renames-during-sync/16928/22
This commit is contained in:
Nick Craig-Wood
2020-06-09 20:40:03 +01:00
parent 2288a5c617
commit 8f42532b6d
4 changed files with 71 additions and 8 deletions

View File

@@ -1324,13 +1324,25 @@ Note also that `--track-renames` is incompatible with
`--delete-before` and will select `--delete-after` instead of
`--delete-during`.
### --track-renames-strategy (hash,modtime) ###
### --track-renames-strategy (hash,modtime,leaf,size) ###
This option changes the matching criteria for `--track-renames` to match
by any combination of modtime, hash, size. Matching by size is always enabled
no matter what option is selected here. This also means
that it enables `--track-renames` support for encrypted destinations.
If nothing is specified, the default option is matching by hashes.
This option changes the matching criteria for `--track-renames`.
The matching is controlled by a comma separated selection of these tokens:
- `modtime` - the modification time of the file - not supported on all backends
- `hash` - the hash of the file contents - not supported on all backends
- `leaf` - the name of the file not including its directory name
- `size` - the size of the file (this is always enabled)
So using `--track-renames-strategy modtime,leaf` would match files
based on modification time, the leaf of the file name and the size
only.
Using `--track-renames-strategy modtime` or `leaf` can enable
`--track-renames` support for encrypted destinations.
If nothing is specified, the default option is matching by `hash`es.
### --delete-(before,during,after) ###