I am syncing my local NAS stuff to OneDrive with rclone which is a really decent solution.
But I am fearing a Ransomware attack on my Windows NAS. When the sync job starts working I would end up to destroy my backup with encrypted data as well. So this would be useless as a protection against ransomware.
rsync is already checking (I guess with help of hashes) if the files have changed in order to decide what to sync and what not to sync. Furthermore you can already simulate what the results would by if you execute the command. Unfortunately the results can not be used for scripting because they are just text on the console.
My Feature request would be to run a check with a dryrun first. If the rsync sync would copy more than a configurable percentage of files, something seems to be really wrong. In this case I would love to have an exit value like "10 - Amount of changed files exceeding threshold".
rsync sync d:\myFolder myremote:backup/myFolder --dry-run --check 2%
If more than 2% of the files would be copied the exit code 10 is raised. So you could easily check inside Batch files or shell scripts if something is about to go terribly wrong and don't execute the real sync command in this case.
-> would also be nice if rclone could send an email in such cases (just dreaming)
I hope you could get what I am trying to achieve.