How to force a cloud storage service to synchronise an encrypted file?

11,240

Solution 1

How cloud synching works

OneDrive support replied & told me they don't support encrypted files (i.e. they use date & file name to detect changes, not file contents \ hash).

I've logged a request for them to use hashing: https://onedrive.uservoice.com/forums/262982-onedrive/suggestions/13292115-detect-changes-to-files-based-on-the-file-contents

I haven't found any information yet on how Dropbox \ Google Drive detects changes.

General solution that is tedious

The only general solution is to:

  • move the file out of your sync folder
  • rename it
  • move it back again

OneDrive then detects it as a new file and uploads it (and deletes the old one in the cloud)

Best solution (if you use Veracrypt)

However here is the ideal solution if you're using Veracrypt (Truecrypt):

Now the file date changes every time you change the contents and cloud backup services will always reupload it.

Solution 2

The solution to force a cloud storage service to synchronise an encrypted file

Herewith in English. I use the latest version 1.19 of Veracrypt

In Veracrypt setting, you have to put the "Preserve modification timestamp of file containers" option turned off. The timestamp on the Truecrypt volume file is then updated when you unmount it.

Google Drive synchronisation considers the modification of the date of the container to do the synchronisation of the crypted container.

Don't forget to put the new Preferences for all installed Veracrypt on your PCs. It is working very well with Google Drive.

I suppose that is ok for all other clouds but that must be verified

Share:
11,240

Related videos on Youtube

Richard
Author by

Richard

Updated on September 18, 2022

Comments

  • Richard
    Richard almost 2 years

    I made a Veracrypt file in my OneDrive / Dropbox folders. I then mounted the file in Veracrypt and added some financial records to the volume and unmounted it.

    Even though the contents of the encrypted volume had changed, the file itself had the same dates and size.

    Will OneDrive / Dropbox / Google drive sync it when I make a future changes because they look at the actual file contents? Or will they think it's the same file as on the server and I'll not save any changes to the cloud?

    If it's the latter case, how should I force syncing? Change the filename?

    • SeanClt
      SeanClt about 8 years
      Why not test it
  • iDevlop
    iDevlop almost 8 years
    The fact that the date of the container does not change is definitely a privacy feature. And instead of copy/rename your VC volume, you could just use a "touch" utility (see superuser.com/a/764721/7546)
  • Krazy Glew
    Krazy Glew over 2 years
    I ran into another issue relevant using VeraCrypt files on Google Drive: on a Google Drive, I copied an old *.HC file, renamed it, but when I tried to open it VeraCrypt complaint “file in use”. Indeed Google Drive was still synchronizing, at about 50%. The error is reasonable, but do you want to rely on both Google Drive and vera correct correctly handling errors, e.g. if they try to open a file and somebody else already has it open?