I'm running v1.57.0. I am backing up my local files to OneDrive using an encrypted remote. The problem I'm having is that after running copy, when I run cryptcheck it gives me an error on one of the files. The error is that hashes differ between the local file and the file in OD. So I ran copy again but that isn't fixing the cryptcheck error. Is there another way to fix it? I assumed the copy command would rewrite a file if there was an update to it or hashes didnt match but it doesn't seem to be working as I thought it would. What am I missing?
the answers to the questions in the template.
when you posted there was a template of questions, none of which were answered.
we cannot see into your computer, so help us to help you, answer all the questions.
I am backing up my local files to OneDrive using an encrypted remote. The problem I'm having is that after running copy, when I run cryptcheck it gives me an error on one of the files. The error is that hashes differ between the local file and the file in OD. So I ran copy again but that isn't fixing the cryptcheck error. Is there another way to fix it? I assumed the copy command would rewrite a file if there was an update to it or hashes didnt match but it doesn't seem to be working as I thought it would.
Run the command 'rclone version' and share the full output of the command.
rclone v1.57.0
os/version: Microsoft Windows 10 Pro 2009 (64 bit)
os/kernel: 10.0.19042.1415 (x86_64)
os/type: windows
os/arch: amd64
go/version: go1.17.2
go/linking: dynamic
go/tags: cmount
Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
-->
Yes
Which cloud storage system are you using? (eg Google Drive)
OneDrive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
thanks but please understand that we cannot see into your computer screen.
need to see a debug log, with the exact command, the exact error,
including at least the top 20 lines of debug log.
run the cryptcheck command as that giving the error.
I'll try to get the log output later today when I can rerun the command but the error was that the hash of the file didn't match between my local copy and the backup copy.
But I am hoping it is possible to discuss whether what I am doing should theoretically fix the issue without the logs. My understanding is that copy command should detect that there is a difference between the file on my local drive and the encrypted on OneDrive, and therefore should rewrite it. Is this understanding correct or not?
as i understand it, rclone copy to a crypt compares modtime and size, not hash.
so it is possible for rclone to copy the file, notice that the modtime and size match and not recopy
but when running cryptcheck, it notices the hash mismatch.
agreed, but in the OP case, rclone copy does not recopy the file, and rclone cryptcheck fails with a mismatched hash.
and what i posted can explain that, was just asking if there was a flaw in my logic?
that rclone copy to a crypt and rclone cryptcheck do not have the same criteria for comparison.
i remember, when first learning about rclone, did the following contrived test.
rclone copy file.txt cryptremote: where file.txt has a size of one byte and timestamp of 01.01.2000.00.00.000
edit file.txt, changing the contents, not the size.
change file.txt timestamp back to 01.01.2020.00.00.000
rclone copy file.txt cryptremote:, this time rclone will not re-copy the file, as size and modtime match the dest.
rclone cryptcheck will fail with a mismatched hash.
That's what is being stated but no logs, evidence as that isn't how copy works so back to either OP is wrong, found a bug or is doing something improper.
Your test scenario is accurate but in actual practice, not sure how that scenario would come up unless the OP is setting the clock back or making a huge modify window.
Back to my point I always make, need a log and we spend less time guessing what happened and more time looking at the actual data.
Sorry, I just deleted that file in OneDrive and re-ran copy. Running cryptcheck again is not giving the hash error. Don't know what caused the hashes to be different. When I was running the copy command earlier it wasn't giving any errors. It was just skipping that file.