wondering if it's possible to output a hashfile during rclone copy, which I can use to check file integrity later on.
My research so far has shown that I can only use a separate run with rclone hashfile after the initial copy, but maybe I missed something.
why I want this?
I'd need to do a verificaytion of the copy process, to be sure nothing got corrupted during copy. Behaviour from other secure copy tools would be: copy -> dump hashes into a hashfile during copy -> do a second read of the destination files and compare with hashfile to make sure no bit has flipped on the way.
Doing it with a second sync run would be possible, but require a second read process (rclone sync --checksum) which I'd like to avoid as time is crucial for my usecase.
Thanks for your feedback. Will definately have a look at hasher. Also the hashes in logging have been on my mind, too. I guess the bash scrip @asdffdsa mentioned is using that. Will try to find it and see if it fits my needs.
I have to admit I don't have code-level knowledge about rclone so the following is straight speculative.
To my understanding rclone is using checksums only for comparing files with same mtime and size, to see if it should overwrite them. Also I'm using rclone for nfs/smb/usb to nfs/smb/usb/tb, so only local copies concerning rclone mechanisms. Maybe cloud services do have integrated hash-check mechanisms te deal with lossy WAN and rclone is using them, but in my case they wouldn't apply.
I'd guess in case of a fresh, local copy rclone will trigger the write and trust the filesystem/os to do it properly. Would actually be great if there's a re-check of the actually written bits. If so I'be keen to get to know more about how it works.
My experience is that sometimes drives/controllers/networks/filesystems or bad karma and especially combinations of them tend to fuck things up some times. I've seen quite some bit flips with different copy mechanisms by now and some without any signs of it in any logging.
Ok, maybe I'm a bit paranoid about it by know. Having a backchecking mechanism makes me sleep better =)