You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cryptcheck: compare checksum for crypted remote #1102
Having a local source and an encrypted remote, the only way to be sure that the remote is "bitperfect" is to download the encrypted remote file, decrypting it, then compare the file against the original.
This is time consuming, because we have to download files...
The suggestion is to encrypt a local file using the same nonce as the one stored in the ACD, then compare checksums for both the encrypted files.
It is MUCH faster to encrypt a local file than download the same file from the cloud.
So without hash support any chance to support flags that are currently not working due no checksum ?
For example file rename with sync, using crypt will mean full download and upload just when you rename some folder.
rclone cryptcheck checks a remote against a crypted remote. This is
the equivalent of running rclone check, but able to check the
checksums of the crypted remote.
For it to work the underlying remote of the cryptedremote must support
some kind of checksum.
It works by reading the nonce from each file on the cryptedremote: and
using that to encrypt each file on the remote:. It then checks the
checksum of the underlying file on the cryptedremote: against the
checksum of the file it has just encrypted.
rsync reports 4 differences. I verified they are different.
rclone --include=tvshow.nfo cryptcheck -v /data/Media1/Videos "riosgd-cryptp:Media/Videos"
2017/02/27 15:39:24 NOTICE: Encrypted Google drive root 'cloudp/lp08934q11u6a5gslo2ddds5b4/hkitmqcr303hk1a33m19ttdq24': 0 files not in Local file system at /data/Media1/Videos
2017/02/27 15:39:24 NOTICE: Local file system at /data/Media1/Videos: 0 files not in Encrypted Google drive root 'cloudp/lp08934q11u6a5gslo2ddds5b4/hkitmqcr303hk1a33m19ttdq24'
2017/02/27 15:39:24 INFO : Encrypted Google drive root 'cloudp/lp08934q11u6a5gslo2ddds5b4/hkitmqcr303hk1a33m19ttdq24': Waiting for checks to finish
2017/02/27 15:39:24 ERROR : Series/Happy.Valley/tvshow.nfo: hashes differ (riosgd-cryptp:Media/Videos) "634bdbfce3e34c26a4c1e1bc3775f647" vs (local:/data/Media1/Videos) "be5781293745490a0a1939f3c1150bf7"
2017/02/27 15:39:25 NOTICE: Encrypted Google drive root 'cloudp/lp08934q11u6a5gslo2ddds5b4/hkitmqcr303hk1a33m19ttdq24': 1 differences found
2017/02/27 15:39:25 Failed to cryptcheck: 1 differences found
root@HS: ~
-># diff /data/Media1/Videos/Series/Fargo/tvshow.nfo /data/Media3/Videos/Series/Fargo/tvshow.nfo
11c11
< <episode>19</episode>
---
> <episode>20</episode>
223c223
< <dateadded>2017-02-19 09:44:03</dateadded>
---
> <dateadded>2017-02-21 14:17:26</dateadded>
Activity
ajkis commentedon Feb 5, 2017
The checksum support for crypt is planed, the sooner the better, since its tied with some other rclone features as well.
ncw commentedon Feb 5, 2017
This is a good idea in theory...
However it is a little tricy to implement
ajkis commentedon Feb 6, 2017
So without hash support any chance to support flags that are currently not working due no checksum ?
For example file rename with sync, using crypt will mean full download and upload just when you rename some folder.
naeloob commentedon Feb 7, 2017
Nice!!
+1
That's what i was trying to ask for in #1091 (comment)
Stonedestroyer commentedon Feb 8, 2017
Google Drive supports returning MD5 and also Amazon I believe so it could be used to verify files.
jrarseneau commentedon Feb 8, 2017
+1..00 👍
ajkis commentedon Feb 8, 2017
@ncw acording to amazon their app uses MD5 to check integrity
https://forums.developer.amazon.com/questions/32746/amazon-drive-mac-application-integrity-check.html
ncw commentedon Feb 8, 2017
@ajkis
rclone verifies MD5SUMs in normal operation too - just not with crypt
ncw commentedon Feb 11, 2017
I'm going to try to squeeze this in to the 1.36 release so people can check for corruptions.
ajkis commentedon Feb 12, 2017
👍
would this allow for track renames as well ?
ncw commentedon Feb 12, 2017
@ajkis No it is purely an integrity check
ncw commentedon Feb 12, 2017
I've implemented rclone cryptcheck in this beta please give it a go!
http://beta.rclone.org/v1.35-91-g01c747e-cryptcheck/ (uploaded in 15-30 mins)
Here are the docs
rclone cryptcheck checks a remote against a crypted remote. This is
the equivalent of running rclone check, but able to check the
checksums of the crypted remote.
For it to work the underlying remote of the cryptedremote must support
some kind of checksum.
It works by reading the nonce from each file on the cryptedremote: and
using that to encrypt each file on the remote:. It then checks the
checksum of the underlying file on the cryptedremote: against the
checksum of the file it has just encrypted.
Use it like this
You can use it like this also, but that will involve downloading all
the files in remote:path.
After it has run it will log the status of the encryptedremote:.
Usage:
rclone cryptcheck remote:path cryptedremote:path [flags]
Add cryptcheck command to check integrity of crypt remotes #1102
ncw commentedon Feb 12, 2017
Correction: this is the beta http://beta.rclone.org/v1.35-92-g18c75a8/ (uploaded in 15-30 mins)
[-]compare checksum for crypted remote[/-][+]cryptcheck: compare checksum for crypted remote[/+]calisro commentedon Feb 27, 2017
I'm getting differing results between my tests. Not sure why.
I have a mount of the crypted drive on /data/Media3 and the local volume is /data/Media1
rsync reports 4 differences. I verified they are different.
ncw commentedon Feb 28, 2017
@calisro strange!
If you download the files using rclone copy, do you see the 4 file differences or only the 1?
Were there any other log messages when you did the rclone cryptcheck?
calisro commentedon Feb 28, 2017
I replaced those files already but let me try to recreate it and save it.
ncw commentedon Mar 5, 2017
As far as I can see this is done for the 1.36 release. If there are any outstanding problems - please open a new issue.
Saviq commentedon Mar 5, 2017
Does copy/sync/check with --checksum work on crypted remotes now, too?
ncw commentedon Mar 7, 2017
@Saviq no - I'm afraid not.