Syncing Google Drive on Linux (using ODrive free)
GNOME's Google Drive integration never quite seems to work for me. So I started using google-drive-ocamlfuse, which is great, if you're happy with using Google Drive as a remote mount. The internet where I am isn't reliable enough for me to trust that kind of connection, so I'm looking for a Google Backup and Sync type option for Linux.
I've found one I'm happy with.
It's ODrive. Yes, there's no desktop client for Linux (yet?). Just the miserably poorly documented ODrive CLI. But it's not actually hard to get it working.
Scott Lowe wrote a great post that covers just about everything. Go read that. Then, if you're using GNOME, do the following.
Add a "Sync" option to the Nautilus right-click context menu (gist here):
#!/bin/bash
# Put this file at ~/.local/share/nautilus/scripts/Sync
# Remember to `chmod +x` it
IFS='
'
for file in ${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS}
do
if [[ $file == *.cloud ]] || [[ $file == *.cloudf ]]
then
odrive sync "$file"
fi
done