Insync file and folder integrity

Insync Team,

I have started testing Insync with our Google Team Drives. We have gigabytes of files in Team Drive and I am concerned about maintaining file integrity. Some questions please:

How does insync maintain file and folder integrity between local and cloud files?
How does it verify that each file uploaded to Google Drive is a binary match of the local file?
How does it verify each local downloaded file is a binary match of the file as it exists in Google Drive?

Is there a way to have Insync run a check of its consistency to make sure:

  1. All local files and folders exist in Google Drive
  2. All Google Drive files and folders exist locally
  3. The local files are a binary match of the Google Drive files.
  4. All local databases and caches are consistent and up-to-date

Thank You

For example, the Google Drive API has an md5Checksum property which can be used to verify the integrity of uploaded and downloaded files.

Does Insync make use of this by comparing a local MD5 hash with the Google Drive md5Checksum property?

(I would prefer SHA256 or SHA1, but these do not appear to be available in the API)

Pretty sure md5 is used. Otherwise there’s no way to avoid any unnecessary upload/download like Insync does right now.

SHA1 & SHA256 is only superior when you need a cryptographic hash. MD5 is perfectly fine as a checksum.

1 Like

I prefer not to speculate. There are other ways to sync files without using hashes. Many of the sync tools I have tried don’t use hashes, but use other file metadata (like file size, last modified time, etc).

You can change all metadata and Insync can still match identical files.

There could be workarounds in other scenarios, sure. But it’s simply impossible to have a robust sync without using hashes. And Insync certainly has passed this basic robustness.

You can also find md5 of your files stored in Insync’s database.

1 Like

Hello @Wayne_Sherman, regarding file integrity, @Hawk is correct. We use the md5Checksum metadata that Google provides. This is enough for checksumming purposes (cryptographic hash is overkill). This is not provided in Google-formatted files (e.g. Google Docs, Sheets) as they don’t have an exact binary representation (if you don’t convert then it should be safe).

For the consistency tool, sorry, but we don’t have that.

Thanks for your feedback.

3 Likes

For the consistency tool, sorry, but we don’t have that.

Without a consistency check, you have no way to confirm that the software is working correctly. There might be hidden bugs which can cause loss of data. For example, I have files in a Google Team Drive which were created on July 18, but Insync does not appear to recognize they exist and does not sync them to my local directories.