Google Drive on Ubuntu
Contents
I like storing my documents in the cloud so that I can easily access them anywhere. It’s not so easy with Google Drive on Ubuntu, however, which has no native Linux client - a long requested feature that seems unlikely to arrive anytime soon 1. Luckily there are many third-party clients to choose from; so many that it’s hard to choose one.
Ask Ubuntu wisdom is to using GNOME Online Accounts which is pre-installed in Ubuntu as part of the GNOME desktop environment 2. This was easy to setup, without the need to jump into the terminal. It mounts Google Drive but only streams files. That means that no files are stored locally which adds an annoying latency to the opening of files. It sharply contrasts with the overall snappiness of the OS. I found that I couldn’t even attach a file to Gmail (web) without first copying that file to a local storage. If I only used Google Drive occasionally this might be alright but the vast majority of files I use daily live in Google Drive. Furthermore, the mounted drive does not seem accessible from the terminal 3.
I want a way to continuously sync files between Google Drive and my local storage. That is that my files are also stored locally and any local changes are automatically propagated to the cloud, vice versa. The it-just-works way of doing this seems to be to pay for a client. Insync comes at a cost of $29.99 USD per cloud account and overGrive is a cheaper option at $9.99 USD 4. I respect that devs deserve to be compensated for their work but I’d prefer to look for free options first before pulling out my wallet.
A freemium option is Odrive which seems to offer reasonable continuous sync features in the free version. I plan to try this out since it seems like it’ll be easy to setup.
The popular free and open-source option is RClone which has the slogan “Rclone syncs your files to cloud storage”. It can mount Google Drive to the Ubuntu file system and offers a sync command in the command line that let you sync between a local directory and a remote directory (e.g. Google Drive) 5. Although RClone doesn’t offer continuous sync it does seem possible to get close by running the sync command frequently using a cronjob 6. There is a risk of messing up the script and accidentally deleting files so it’ll be prudent to back up your files, as you should be doing anyway 7.
There are many other Google Drive clients, some of which I’ve listed below
Here are some that offer continuous sync or something very close:
- https://github.com/bcedu/VGrive/
- https://github.com/vitalif/grive2
- https://github.com/MStadlmeier/drivesync
There are others that do not offer continuous sync by default but could be useful:
- https://github.com/prasmussen/gdrive
- https://github.com/hschauhan/gosync
- https://github.com/odeke-em/drive
-
https://support.google.com/drive/thread/3511652/linux-client-for-google-drive?hl=en ↩︎
-
https://askubuntu.com/questions/1368874/can-google-drive-desktop-be-used-on-ubuntu ↩︎
-
https://askubuntu.com/questions/1332050/google-drive-repository-from-the-terminal ↩︎
-
Prices at time of publishing ↩︎
-
The rule of thumb for backup is to have 3 copies of the data you care about. The 3-2-1 rule of thumb is explained here: https://www.hanselman.com/blog/the-computer-backup-rule-of-three ↩︎
Author Nest of Wire
LastMod 2023-12-04