Monthly Archives: April 2012

Google Drive file synchronization algorithm

I’ve just figured out another huge disadvantage of Google Drive. If a file is changed, Google Drive re-uploads the whole file again. Yes, that means that if you change 1 byte inside a 4 GB file, Google Drive will re-upload the whole 4 GB! I didn’t bother to check this when I first tried it because I didn’t even think about that possibility! Haven’t Google heard about rsync? That’s just ridiculous!

So using large TrueCrypt volumes in Google Drive is probably a bad idea. Its main use should be to store some random insensitive data like crappy photos that nobody wants to see anyway. For anything sensitive, something like Wuala should probably be used instead.

Google Drive

Google Drive is probably one of the most awesome Google services, and yet it demonstrates how stupid Google has become.

One important thing about cloud storage is encryption. With Google Drive you get no encryption, except for secure transmission. Well, that means that we don’t have to worry about man-in-the-middle attacks, but that’s it. If some asshole at Google wants to look at your files, he can do that. If Google wants to mine your data for anything, they can do that. In fact, they can do about anything with your files as long as nobody catches them.

Another thing is not that awful, but much, much more stupid. In fact, this is about the most silly thing I’ve ever encountered in widely used software. I’ve already mentioned about numerous ergonomic failures of Google, such as Instant Preview or whatever that’s called, or heavy (ab)use of JavaScript and Ajax. But this one beats everything in the way of stupidity, although thankfully it’s not even as remotely annoying as those previews. Now listen carefully.

Say, there is a program that asks you to select a folder to store something. Doesn’t sound like a ridiculously difficult feature to implement, does it? Well, for Google it apparently is! Google Drive asks you to select a folder to store the contents of your Drive. Suppose you selected the “d:\data\google” folder. Does that mean Google Drive will store its data in the “d:\data\google” folder? No, of course not! That would be distasteful at least! Google Drive is smart enough to guess that you actually want to store your data in the “d:\data\google\Google Drive” folder. What? That’s not what you meant? You’re kidding!

Can you change your Google Drive location to a folder you actually want your data to be in? The answer is that you can. It is even pretty easy, although not even remotely obvious. Here’s the procedure:

1. Choose any random location for your Google Drive.
2. Exit Google Drive.
3. Move/rename the Google Drive folder to whatever location you want.
4. Start Google Drive.
5. Click Google Drive icon and select the error message about the folder being not found.
6. Click “Locate folder” in the opened window and select your new folder.
7. Profit!

Now about encryption. The easiest way to deal with it is to use TrueCrypt (now dead, but there are alternatives) to create an encrypted volume in the Google Drive folder, then sync it. There’s some issues with this approach, though:

1. You’ll have to disable timestamp preservation for volumes, otherwise Google Drive won’t sync the modified volume. It can be implemented either by disabling this feature globally or by using “/m ts” when mounting from command line.
2. There’s no option to save the password. TrueCrypt is meant to secure locally stored data so it kind of makes sense. But if you don’t care about anyone with physical access to your computer accessing your data, you can just create a BAT file to mount the volume from the command line, specifying the password there. Protecting the BAT file with NTFS permissions is a nice idea anyway, though.
3. The biggest issue is that the TrueCrypt volume is fixed in size. You can use sparsely allocated NTFS file to store it, but Google Drive won’t know anything about it and will try to upload the whole volume anyway, including unallocated pieces. That means that if you have a 4 GB volume with 100 MB of data in it, it will still occupy the whole 4 GB in Google Drive. There’s no elegant way around it. One workaround is to choose the size of the volume sparingly and increase it as needed, which involves creating a new volume of a bigger size and copying your files there. In this case you should only store really sensitive data there. Another workaround is to create a volume as big as possible and to store everything there even the files you don’t really need to encrypt. In this case you won’t be able to share those files with anyone or to access them through the web interface.

Right now, something like Wuala is much easier to use if you want an encrypted drive. On the other hand, TrueCrypt is much more flexible and Google Drive is a way cheaper. A nice idea is to use a TrueCrypt volume stored on the Google Drive and sync some folders to Wuala to provide additional backup and convenient access.

One more thought about how stupid Google is: with Google Drive you can create folders for your Google Docs. Why is that stupid? Well, think about it once more: it took a few years of development to finally introduce a way to group Google Docs in folders, which should be possible from the very beginning! Google definitely seems to have some grudge against folders. After all, they still haven’t implemented them in GMail nor they intend to. Instead we’re stuck with these idiotic “labels” which force IMAP users to download all mail twice: once from “All Mail” folder, and once from “Inbox” folder. Oh, I don’t even mention additional labels if you have them.

So what are the hardest tasks for Google to implement? Apparently these:

1. Introduce folders anywhere. It was hard in Google Docs, it is impossible in GMail.
2. Make Google Earth map to always have north at the top side. I have no idea why Google Maps behaves like a regular map – perhaps some browser limitations prevented them from introducing such important usability failure. But that is compensated by the lack of many simple and useful tools there, like a ruler.
3. Introduce a way to disable Instant Previews. That feature is certainly useless enough to be forced on everyone.
4. Provide a way to attach regular files to e-mail. By “regular files” here I mean regular files, not “files that are considered safe to send by Google’s twisted rules that has nothing to do with real security”.

More? Probably. I don’t even want to know.