When dealing with this other topic, I’m trying to put together a script to force hash check.
Evaluating the available options, I think they are somewhat “overlapping”, and maybe some are missing:
--size-only - Skip based on size only, not mod-time or checksum = checks: size
--ignore-size - Ignore size when skipping use mod-time or checksum = checks: mod-time OR checksum
--ignore-times - Dont skip files that match size and time = checks: size, time and hash (last one forced?)
--checksum - Skip based on checksum & size, not mod-time & size = checks: checksum AND size (first one forced?)
As we have three parameters (time, size and checksum/hash), it would not be better if we had something like:
--force_time
--force_size
--force_checksum
--ignore-time
--ignore-size
and the default option would be to evaluate size and time, as it is today (and the last two options above would be to deal with this default option).
(This above is only a suggestion, there are several possible forms, combining 3 elements in pairs, eg.)
It is not clear to me whether the options --ignore-times
and/or --checksum
actually force the hashing check.
For example, I created a first script with the command:
rclone check [source] [destination]
and it returned:
...
DEBUG : [file 1]: OK
...
DEBUG : [file n]: OK
NOTICE: Encrypted drive 'ioioio': 0 differences found
NOTICE: Encrypted drive 'ioioio': 451 hashes could not be checked (?!?!)
(Note: There are 451 files in the folder)
Then I created a second one with the option:
rclone check [source] [destination] --checksum
and it returned exactly the same:
...
DEBUG : [file 1]: OK
...
DEBUG : [file n]: OK
NOTICE: Encrypted drive 'ioioio': 0 differences found
NOTICE: Encrypted drive 'ioioio': 451 hashes could not be checked
Using the --ignore-times
option also returned exactly the same result.
If the hashes could not be checked, how can it return that there are no differences?
(Note: Rclone: Version “v1.40-043-gb63ebf47-fix-2191”)